CSE 80 -- Lecture 4 -- Jan 16


Quoting and input line expansion.

Input line undergoes the following expansions in order:

  1. brace expansion: $ echo /home/{bsy,bozo,clinton}/.bashrc
  2. tilde expansion $ echo ~/.bashrc
  3. dollar expansion of variables and parameters $ echo $HOME
  4. command substitution $ echo `pwd`/.bashrc
  5. arithmetic expansion $ echo $[ 3 + 4 ]
  6. word split at unquoted spaces/tabs
  7. pathname expansion (*,?, and [a-f])
Make sure you can tell forward quote (') from backquote (`). -- I recommend using the "fixed (misc)" font for displaying fixed font. For Netscape, this is set via the Options:General Preference:Fonts tab.

Command substitution involves the use of a pipe to capture the output of a subprocess.


[ CSE 80 | ACS home | CSE home | CSE calendar | bsy's home page ]
picture of bsy

bsy@cse.ucsd.edu, last updated Tue Mar 18 15:49:26 PST 1997.

email bsy