Write a command to kill the last background job?
-
Kill $!
-
Kill $@
-
Kill $%
-
Kill $&
A
Correct answer
Explanation
In shell scripting, $! is a special variable that holds the PID (Process ID) of the most recently executed background command. To kill the last background job, you use 'kill $!'. Other special variables like $@ (all arguments), $# (argument count), $? (exit status) serve different purposes. Only $! gives you the last background job's PID.