0 How Commands Are Interpreted (Part Two)
ksherlock edited this page 2016-07-29 08:52:53 -04:00

This is how commands are interpreted in mpw-shell.

  1. Join lines and remove # comments
  2. parse control structures - begin/end, ( ... ), for/end, loop/end, ;, |, ||, &&;
  3. replace variables (and someday subshells)
  4. split into tokens, remove quotes and escape characters
  5. process i/o redirection
  6. execute the command (builtin or external)