Search This Blog

Friday, September 01, 2006

Shell Scripting: Special Variables

  • $? Exit status or return code of last command.
  • $# Number of arguments.
  • $@ Argument 1 thru n with Input Field Separator.
  • $* "$1" $2" ... $n.
  • $! Process id of last background process.
  • $$ Process id of shell running this script.
  • $- The current shell flags.

No comments: