Special Parameters

Some special parameters are automatically set by the Korn shell, and usually cannot be directly set or modified.

$# number of positional parameters
$@ all positional parameters ("$1", "$2", ..., "$n")
$* all positional parameters ("$1 $2... $n")
$? exit status of the last command
$$ process id of the current shell
$ current options in effect
$! process id of last background command

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.