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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!