The following special variables are predefined:
| $ | The last argument of the previous simple command, also the pathname of the mailfile when checking for mail |
| $# | The number of positional parameters, $1 ... |
| $- | The set of options which were supplied at invocation |
| $? | The return value of the last command executed, 0 to 255. If greater than 127, indicates that the command was terminated by a signal. The signal number is equal to $? minus 128. |
| $$ | The process ID of this dbx process |
| $! | The process ID of the last background process |
| $* | The positional parameters |
| $@ | The positional parameters |
The last two are equivalent except when quoted. $* yields one argument with the positional parameters separated by spaces. $@ yields n arguments, each quoted with "". If the positional parameters are:
a
hi there
foo
(that is, three parameters, one containing a space), $* is equal to
"a hi there foo"
whereas $@ is
"a" "hi there" "foo"