Question: You will create your own linux shell by writing a C/C++ program. Please go through the demo codes provided and try to understand the functions

 You will create your own linux shell by writing a C/C++

You will create your own linux shell by writing a C/C++ program. Please go through the demo codes provided and try to understand the functions mentioned in the hint section. Your new shell should support following commands and similar commands: user commands, such as Is, date, Is - - -a commands with I/O re-direction , ex : Is 1>a a.txt commands with a single pipe ,ex : who | wc -1 command with piping and redirection; ex: Is 1 sort > b.txt Like all Linux shells, your shell executes a loop. It prints the shell prompt, reads the command line (terminated with NULL), parses the command line and creates its arguments, executes the command with its arguments, then waits until the command finishes. It should be a child process which runs a command. Following image shows an example solution in action where Is command is operated first, and others subsequently until the entered command is exit

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!