Bash Scripting - Variables
What will be the output of this script?
echo "Process ID: $$" false echo "Exit status: $?"
echo "Process ID: $$" false echo "Exit status: $?"
$$ prints the current script's process ID (a number), false command returns exit status 1 (failure), so $? will be 1.$$=PID, $?=last command exit status [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions