Question
CS 365 Fall, 2017 Programming Assignment 2 Due: Thursday, October 19, 2017 You are to create a simple menu driven shell. Your shell should present
CS 365
Fall, 2017
Programming Assignment 2
Due: Thursday, October 19, 2017
You are to create a simple menu driven shell. Your shell should present a list of options to the user of alternative actions they are allowed to perform. The list should be a set of menu items. The user can choose one of the items, it executes, and then the shell presents the list again. As a minimum, your shell should allow the user to choose between (1) executing the who command, (2) running an editor, (3) listing the contents of the current directory, and (4) logging off.
Note: If your shell is installed in the passwd file as the default shell, when you exit the program it will log off the user.
Your menu should look something like:
Your choices are:
[1] list the users currently on the system
[2] running the ed editor
[3] list the files in the current directory
[4] log off
What is your choice (type the number):
The expectation is that the user will type one of the numbers 1 to 4, the shell will act as a parent to create a child process, the child will execute the appropriate programs, and then, when the child terminates, the parent will display the menu again.
You may add to the list of actions. The choice of editor is up to you, the programmer. Good programming practices (indenting, commenting, etc.) are expected!
As in the previous programming assignment, leave the file on the system and submit the source code filename and path.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started