Question: Assignment Description This assignment is to write a shell program which will implement 7 commands: 1 ) the echo command, 2 ) the PS
Assignment Description
This assignment is to write a shell program which will implement commands: the "echo" command, the PS prompt command, the "cat" command, the cp file command, the rm file command the "mkdir" directory command and the "rmdir" directory command.
Program Requirements
The student will create an application which will implement a command loop and accept the commands defined by the following requirements. These will be "builtin" commands.
The student will implement the "echo" command to display its argument to the console. It will assume a carriage return. If the option is entered the carriage return will not be issued.
The student will implement the PS command to change the display of the prompt. The initial prompt will be the $
The student will implement the "cat" command to display the contents of a file.
The student will implement the cp command to copy the contents of a file.
The student will implement the rm command to delete the file.
The student will implement the "mkdir" command to create a directory.
The student will implement the "rmdir" command to delete the directory.
The student will implement the "exit" command to exit mysh
If an incorrect command is entered a "Usage" message will be displayed and the prompt will be redisplayed.
The student is required to use the ansi" option to gec for this assignment.
The student is required to put their name at the top of the source file.
The name of the program will be mysh an abbreviation of my shell". The program must be written in C and named myshc
The student will "tar" the program. The tar command for the C program is: $ tar czf studentlastnamemyshtgz myshc
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
