Question: Write a program in Python that implements a simple shell. The shell takes a user command as input and executes the command. When the shell

Write a program in Python that implements a simple shell. The shell takes a user command as input and executes the command. When the shell is started, it should take a user command as input, execute it and display the output. The following example shows an execution of the shell. It displays the command prompt uofmsh and takes the user commandlsas input from STDIN. It then executes the command ls and prints the output to STDOUT.

Write a program in Python that implements a simple shell. The shell

Implement the command cd in your shell using the chdir(2) system call. Make sure that cd - should change the directory to the last directory that the user was in. Verify that the cd command works correctly by using the pwd command which displays the current working directory.

takes a user command as input and executes the command. When the

$./uofmsh uofmsh> Is ** output of Is uofmsh> 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!