Contents / Previous / Next


Special Parameters

Special shell parameters ($?, $*,...) may only be referenced;
assignment to them is not allowed. $* command-line arguments as one string $@ command-line arguments as list of strings (useful for writing wrapper shell scripts that just add one argument) $# number of command-line arguments $? status of the most recently executed foreground pipeline, i.e., the exit code of the last command $$ process ID of the shell. In a () subshell, it expands to the process ID of the current shell, not the subshell. $! process ID of the most recent background command (after executed with &). $0 name of the shell or shell script. $- current option flags as specified upon invocation, by the set command, or those set by the shell itself (such as the -i option).