Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, you will write a shell that allows the user to interactively execute Unix programs. Your shell, called New Shell (newsh), reads commands

In this assignment, you will write a shell that allows the user to interactively execute Unix programs. Your shell, called New Shell (newsh), reads commands typed by the user and then executes them. It also allows users to set variables that can be used in subsequent commands. You may write newsh in C or C++.

newsh is somewhat similar to existing shells such as csh, bash, ksh, tcsh and zsh. However, it lacks many of the features of those shells. Its syntax and command set may be different. newsh takes commands from standard input and directs all its output to standard output. Like other shells, newsh accepts both built-in commands and program-control commands. Commands are constructed out of tokens. A token is string without any space. Tokens are subject to variable substitution, as described below. There can be any amount of empty space before and after tokens. The % symbol introduces a comment, which continues to the end of the line. You may assume that % never appears within a token. newsh ignores all characters in a comment. If a line is empty (or just spaces) except for a comment, it is a valid command that has no effect.

Build-in Commands newsh supports following build-in commands:

set variable name

cd directory name

bp

quit

program control functions

cmd param*

cmd param* &

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

Explain why evaluation is important.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago