Question: In this assignment, you will implement a simple shell. The run command will execute other programs specified by the users. For example: run 1s will

 In this assignment, you will implement a simple shell. The run

In this assignment, you will implement a simple shell. The run command will execute other programs specified by the users. For example: run 1s will execute 1s. run 1s -I will execute 1s -1 run date will execute date If user provides an unknown program, the shell should print out an error message. Run azzxcd will try to execute azzxcd but will fail. The exit command will just exit myshell. If user enters an empty command, do nothing and return to the prompt. If user enters commands other than run or exit, the shell should print out an error message: Additional, myshell will also announce the pid of the child process. You will need to use the following systems calls: fork, wait, execup, exit,... to implement this assignment. Manual pages (man pages) will give you reference documentation for system calls. You also can use this online manual if you'd prefer. The structure of your program should look like this: In a loop, prompt the user for a command and parameters. (Use fgets for this) When a command is given, insert the command and the parameters into an array of C strings, Use strtok to tokenize the string. Your program needs exam In this assignment, you will implement a simple shell. The run command will execute other programs specified by the users. For example: run 1s will execute 1s. run 1s -I will execute 1s -1 run date will execute date If user provides an unknown program, the shell should print out an error message. Run azzxcd will try to execute azzxcd but will fail. The exit command will just exit myshell. If user enters an empty command, do nothing and return to the prompt. If user enters commands other than run or exit, the shell should print out an error message: Additional, myshell will also announce the pid of the child process. You will need to use the following systems calls: fork, wait, execup, exit,... to implement this assignment. Manual pages (man pages) will give you reference documentation for system calls. You also can use this online manual if you'd prefer. The structure of your program should look like this: In a loop, prompt the user for a command and parameters. (Use fgets for this) When a command is given, insert the command and the parameters into an array of C strings, Use strtok to tokenize the string. Your program needs exam

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!