PrepAway - Latest Free Exam Questions & Answers

The command echo $! will produce what output?

The command echo $! will produce what output?

PrepAway - Latest Free Exam Questions & Answers

A.
the process id of last background command

B.
the exit status of the last command

C.
the exit status of the last background command

D.
the process id of the current shell

E.
the name of the command being executed

Explanation:
$? is the exit code of the last command
$$ the process id of the current shell or script
$_ the name of the last argument of the last command (or the command itself if no argument was given)
$0 the name of the script/command being executed


Leave a Reply