What steps does the shell take after processing a command.
Once a command line is terminated by the key the shell continues to process the command line in passes.
- Parsing: The for the shell is to separate the commands line into words. For this it uses the references of spaces and delimiters specified by the user. Any consecutive spaces are replaced by a single space unless specified.
- Identifying variables: Any word preceded by a $ sign are treated as variables unless specified so.
- Substitution: Any command surrounded by back quotes are executed by the shell and replaces the command with the output given.
- Wild card recognition: After all the above tasks are completed the shell looks for wild card symbols in the command line.
Post a Comment