Bash special parameters

Positional parameters $1,$2,$3… and their corresponding array representation, count and IFS expansion $@, $#, and $*.
$_ last argument of last command
$# number of arguments passed to current script
$* / $@ list of arguments passed to script as string / delimited list
$- 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


Leave a comment

You must be logged in to post a comment.