13.14. Order of Expansion

 <  Day Day Up  >  

When you are performing the expansion of variables, commands, arithmetic expressions, and pathnames, the shell is programmed to follow a specific order when scanning the command line. Assuming that the variables are not quoted, the processing is performed in the following order:

  1. Brace expansion

  2. Tilde expansion

  3. Parameter expansion

  4. Variable substitution

  5. Command substitution

  6. Arithmetic expansion

  7. Word splitting

  8. Pathname expansion

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net