Question: Problem 4 Write a bash script that prints to the standard output (screen/terminal): a) The name of the shell from which your script started (spawned/forked)
Problem 4
Write a bash script that prints to the standard output (screen/terminal):
a) The name of the shell from which your script started (spawned/forked)
b) PID of the shell from which your script started (spawned/forked)
c) PID of the process that executes your shell (PID of spawned/forked shell
-Note that the command echo $0 may not be helpful when you call the script with a relative or absolute pathname. Consider using commands ps and cut as well as some Keyword Variables.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
