Thursday, June 26, 2008

BASH TIP: Script variables

Bash has some useful builtin variables. Here is a list of a few.

$$ : The PID of the script
$? : The exit status of the last command
$# : The number of command line arguments passed to script
$! : The PID of the command that has just been executed (and backgrounded)

No comments: