Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Program Python Implements Simple Shell Shell Takes User Command Input Executes Comma Q35608286

Write a program in Python that implements a simple shell. Theshell takes a user command as input and executes the command. Whenthe shell is started, it should take a user command as input,execute it and display the output. The following example shows anexecution of the shell. It displays the command prompt ‘uofmsh’ andtakes the user command‘ls’as input from STDIN. It then executes thecommand ‘ls’ and prints the output to STDOUT.

$./uofmsh uofmsh> Is ** output of Is uofmsh> exit

Implement the command cd in your shell using the chdir(2) systemcall. Make sure that ‘cd -‘ should change the directory to the lastdirectory that the user was in. Verify that the cd command workscorrectly by using the ‘pwd’ command which displays the currentworking directory.

$./uofmsh uofmsh> Is ** output of Is uofmsh> exit We were unable to transcribe this imageShow transcribed image text $./uofmsh uofmsh> Is ** output of Is uofmsh> exit

Leave a Reply

Your email address will not be published. Required fields are marked *