Tuesday, March 12, 2013

Dollars in Shell

As pointed out here (stackoverflow : link):
  • Positional parameters $1 ,$2,$3… and their corresponding array representation, count and IFS expansion $@, $#, and $*.
  • $- current options set for the shell.
  • $$ pid of the current shell (not subshell)
  • $_ most recent parameter (or the abs path of the command to start the current shell immediately after startup)
  • $IFS the (input) field separator
  • $? most recent foreground pipeline exit status
  • $! PID of the most recent background command
  • $0 name of the shell or shell script

No comments:

Post a Comment