Question: can you please create the shell and test it to make sure there's no error. please avoide chat gpt because of the last time it

can you please create the shell and test it to make sure there's no error. please avoide chat gpt because of the last time it was wrong.  can you please create the shell and test it to make
------------------
The is the code from the commandServer2.c file.
sure there's no error. please avoide chat gpt because of the last
time it was wrong. ------------------ The is the code from the commandServer2.c
file. 2. Create a command shell based on commandServer2.c that recognizes the

2. Create a command shell based on commandServer2.c that recognizes the following commands and calls appropriately named stub routines for each of them. Hand in a separate listing and set of tests that shows that the appropriate routine is called. Create the stubs in a separate file that is included with your main and interpret routine. DO NOT IMPLEMENT THE FUNCTIONALITY OF ANY OF THESE METHODS AT THIS STAGE. The only thing a stub routine should do is return a string "This functionName is not yet implemented" in order to identify which function was called. (4) Use a lookup table to find each command. If the command isn't in the list respond with "commandname not found"). a. export varzvalue unset var b. chdir dirname (3) c. access file1 file 2 file3 ...... (2) d. chmod octalpermission file1 file2 file3 .... (3). e. path file1 file2 file3 .... (3) f. touch m time1 -a time2 file1 file2 file3... (3). g. In -5 -f file1 file2 (3) //Examples of stub routines - the purpose here is to test command and control char "sample (char "cmd, char "remainingTokens []) f int count =; static char msg[1ee]; for (int i=0; remainingTokens [1];i++){ if (access (remainingTokens [i],R,OK)=m ) countt+; 3 sprintf(msg, "\%d files are readably by mel", count); return msg; 3 char "sample2(char * cmd, char * remainingtokens[]) \{ int arge; //this is the number of remaining tokens //Write a loop to count them! // while ( (flag=getopt(argc, remainingtokens, "a:b:c")) I=1) f case 'a': //capture the flag break; case " b ": // capture the flag break; case ' c ': // capture the flag break; 2 //Depending on what my flags have been set to, perform what's needed. 3 char " displayUsers () return "Command 'displayUsers' was received"; 3

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!