Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

3.1.1 Shell Operation

The following is a brief description of the shell's operation when it reads and executes a command. Basically, the shell does the following:

  1. Reads its input from a file (see section 3.8 Shell Scripts), from a string supplied as an argument to the -c invocation option (see section 6.1 Invoking Bash), or from the user's terminal.
  2. Breaks the input into words and operators, obeying the quoting rules described in section 3.1.2 Quoting. These tokens are separated by metacharacters. Alias expansion is performed by this step (see section 6.6 Aliases).
  3. Parses the tokens into simple and compound commands (see section 3.2 Shell Commands).
  4. Performs the various shell expansions (see section 3.5 Shell Expansions), breaking the expanded tokens into lists of filenames (see section 3.5.8 Filename Expansion) and commands and arguments.
  5. Performs any necessary redirections (see section 3.6 Redirections) and removes the redirection operators and their operands from the argument list.
  6. Executes the command (see section 3.7 Executing Commands).
  7. Optionally waits for the command to complete and collects its exit status (see section 3.7.5 Exit Status).

 
 
  Published under the terms of the GNU General Public License Design by Interspire