Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translated the pseudo-code below into a C program to act like a small shell that process single command entered by the user. In particular, the

Translated the pseudo-code below into a C program to act like a small shell that process single command entered by the user. In particular, the program assembles the command and executed. it. The command/programs location can be anywhere in $PATH and might have arguments.

E.g., if the input-line entered by use is

Is-F

your program should assemble this command-lines and executed it.

The Pseudo-code

Algorithm: While (1) begin read command line from user // Use Unix read/write system calls assemble command args. duplicate current process (fork) child should exec to the new program parent process waits for its child to terminate end

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

include include include include define MAXLINE 100 define MAXOPTIONS 5 int ma... 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

Financial Accounting in an Economic Context

Authors: Jamie Pratt

8th Edition

9781118139424, 9781118139431, 470635290, 1118139429, 1118139437, 978-0470635292

More Books

Students also viewed these Programming questions