manpagez: man pages & more
info bashref
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

This document was generated on February 28, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.