Translate the pseudo-code below into a c program to act


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

E.g., if the input-line entered by the user is ls -F your program should assemble this command-lines and execute 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

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Translate the pseudo-code below into a c program to act
Reference No:- TGS02694511

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)