Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

What is the meaning of $? in a shell script?

When going through one shell script, I saw the term "$?". What is the significance of this term?
by

1 Answer

Kajalsi45d
$?-The exit status of the last command executed.

$0-The filename of the current script.

$#-The number of arguments supplied to a script.

$$-The process number of the current shell. For shell scripts, this is the process ID under which they are executing.

Login / Signup to Answer the Question.