Question: C Programmung : Come up with a simple shell program in C, using various unix system calls, such as fork, execv , wait, etc. to
C Programmung :Come up with a simple shell program in C, using various unix system calls, such as fork, execv, wait, etc. to accomplish the following tasks: 1. Once executed in your home directory, it should switch to yourName%. For example, if your login name is jdoe, /home/jdoe> shell /home/jdoe%
2. It can execute the following UNIX commands ls, pwd, cd, more, quit, as well as a compiled c program, I_did_it, that simply prints out I did it!.
3. It can look for the above compiled program if it is not located in the same directory as where your shell hides, but in a child directory.
4. Your shell can do one of the following: delDir, which will delete a non-empty directory, which might itself contain nonempty directories. accessRightDir, which will list the access rights of all of its sub directories as well as files.
5. Once the quit command is executed, it should return to your home directory, i.e., /home/PLYMOUTH/jdoe%quit /home/PLYMOUTH/jdoe>
You also need to attach to your shell a readable and detailed documentation that specifies which part of your code does the following: print out the custom made prompt; get in the command line; parse the command line; execute the command line; and return back to the normal prompt.
Below is a general guideline for grading:
5 (+/?): A serious effort, as demonstrated via your program and the associated documentation, is made to implement various features. The program compiles and runs.
13 (+/?): One point for each of the six commands as mentioned in Item 2, one point for the feature as mentioned in Item 3, and one additional point for either feature as mentioned in Item 4.
Satisfactory documentation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
