Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Command Line Fundamentals

You're reading from   Command Line Fundamentals Learn to use the Unix command-line tools and Bash shell scripting

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher
ISBN-13 9781789807769
Length 314 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Vivek Nagarajan Vivek Nagarajan
Author Profile Icon Vivek Nagarajan
Vivek Nagarajan
Arrow right icon
View More author details
Toc

Shell Scripts

Shell scripts are text files that contain shell commands. Such files can be executed as if they were programs. A script can be in any language for which an interpreter exists, for example, Python, PHP, Perl, and so on. Similar to how a Python or Perl interpreter loads a program file and executes it, the Bash shell can load and execute shell scripts. However, before we address shell scripts, we need to visit some concepts about how programs are executed.

Shell Command Categories

We will now learn about the various categories of shell commands and how scripts work like any other command. There are four types of commands that can be invoked by name from the shell. These are listed as follows:

  • Binary Executables: Also called executable files or binaries, these contain machine code, and provide most of the functionality of a system, for example, GUI programs such as a web browser, or CLI based programs such as grep. The Bash shell itself is an executable. The...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image