Question: Write a C program to implement the command line shell that does the following: A prompt should be displayed upon starting the execution of
● A prompt should be displayed upon starting the execution of a program and it should allow the user to type basic linux commands one after the other. The program must support at least any 6 commands such as pwd, ls, cd, mkdir, rmdir, rm,cp, etc.
● For each of the user’s commands entered, a separate child process should be created to execute the command and display the output if any.
Note: After displaying the output of each command, the prompt should ask the user for other commands for input and it should be terminated only when the user types the command exit.
Step by Step Solution
There are 3 Steps involved in it
Answer The c code is as follow include include include include include define MAXCOMMANDLENGTH ... View full answer
Get step-by-step solutions from verified subject matter experts
