Write a shell a C program that starts up other programs The

Write a shell; a C++ program that starts up other programs. The shell will read input lines from standard input, parse them into a command name and arguments, and then start a new process running the commands.

Solution

I hope this is what you want ================ #include #include #include #include #include int main() { pid_t pid=fork(); if (pid==0) { static char *argv[]={\"echo\",\"viv is my name.\",NULL}; execv(\"/bin/echo\",argv); exit(127); } else { waitpid(pid,0,0); } return 0; }
Write a shell; a C++ program that starts up other programs. The shell will read input lines from standard input, parse them into a command name and arguments, a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site