Q28
Which of the following special shell variables is used to process number of the last background job?
A.
$!
AnswerB.
$#
C.
$0
D.
$*
E.
None of the above
Answer: Option A
Solution
Answer: Option A
Solution:
In Unix shell scripting, the $! special variable is used to process the number of the last background job. It holds the process ID (PID) of the last command run in the background.So, $! is the special shell variable used to process the number of the last background job.