Question: write a section of code that would simulate the effect of what the shell does when you type the following line of input: % myprog
write a section of code that would simulate the effect of what the shell does when you type the following line of input:
% myprog -l abc
Do not write the code to parse this input, just write the code to simulate the actions the shell would take.
And the following answer already exist in Chegg is not correct. It needs fork/wait.
#include
execlp : it will create new image over old process and excute the commands as well .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
