Shell-Solution

$24.99 $18.99

Objectives There are three objectives to this assignment: To gain yet more familiarity with programming in C and in Linux To learn how processes are handled (i.e., starting and waiting for their termination). To gain exposure to some of the functionality in shells To understand how redirection of stdout works Overview In this assignment, you…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:
Tags:

Description

5/5 – (2 votes)

Objectives

There are three objectives to this assignment:

  1. To gain yet more familiarity with programming in C and in Linux

  1. To learn how processes are handled (i.e., starting and waiting for their termination).

  1. To gain exposure to some of the functionality in shells

  1. To understand how redirection of stdout works

Overview

In this assignment, you will implement a command line interpreter, or shell, on top of Linux. The shell should operate in this basic way: when you type in a command (in response to its prompt), the shell creates a child process that executes the command you entered and then prompts for more user input when it has finished.

The shells you implement will be similar to, but much simpler, than the one you run every day in Unix. You can find out which shell you are running by typing echo $SHELL at a prompt. You may then wish to look at the man pages for sh or the shell you are running to learn more about all of the functionality that can be present. For this project, you do not need to implement as much functionality as is in most shells. You will need to be able to handle running multiple commands simultaneously.

Your shell can be run in two modes: interactive and batch. In interactive mode, you will display a prompt (the string “mysh> “, note the space AFTER the the “>” character) to stdout) and the user of the shell will type in a command at the prompt. In batch mode, your shell is started by specifying a batch file on its command line; the batch file contains the list of commands (each on its own line) that should be executed. In batch mode, you should not display a prompt. In batch mode you should echo each line you read from the batch file back to the user (stdout) before executing it; this will help you when you debug your shells (and us when we test your programs). In both interactive and batch mode, your shell terminates when it sees

the exit command on a line or reaches the end of the input stream (i.e., the end of the batch file or the user types ‘Ctrl-D’).

Jobs may be executed in either the foreground or the background. When a job is run in the foreground, your shell waits until that job completes before it proceeds and displays the next prompt. When a job is run in the background (as denoted with the ‘&’ character as the last non-whitespace character on the line), your shell starts the job, but then immediately returns and displays the next prompt with the background job still

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

Shell https://canvas.wisc.edu/courses/154998/assignme…

9 of 9 9/27/19, 1:07 AM

Shell-Solution
$24.99 $18.99