Computer Science, asked by matezu, 8 months ago

Write a program i.e. is a version of a shell that can take command(s) from the user and execute them on behalf of the user (by spawning a child process to execute the command on behalf of the parent process). It can only execute a few commands as listed below: [+] mkdir [ ... ]

Answers

Answered by sneha966
0

Answer:

Hello

Here is your answer

hello, can you please help me to program i.e. is a version of a shell that can take command(s)from the user and execute them on behalf of the user (by spawning a child process to execute the command on behalf of the parent process). It can only execute a few commands as listed below

:[+] mkdir <file 1> [<file 2> ... <file n>

][+] ls [<dir>][+] cp <source> <dest>

[+] mv <file 1> [<file 2> ... <file n>] <dest>

[+] vi <file>where parameters enclosed in [] are optional parameters.Note that multiple commands are recognized by the shell if each command is delimited by ";". These commands will be executed one after the other.The C program that will act as a shell interface which should accept and execute each command in separate process. There should be a parent process that will read the command and then the parent process will have a child process that will execute the command. The parent process should wait for the child process before continuing. Your program should mimic Linux terminal. This program should be written in C and executed in Linux. You are required to implement five commands out of which one command should be the editor. The program design is entirely up to you but make sure that your shell interpreter is easy to modify.

Hope it helps

PLEASE MARK MY ANSWER AS BRAINLIEST

PLEASE!!

Similar questions