subject

In this assignment, you will write a complete C program that will act as a simplecommand-line interpreter (i. e., a shell) for the Linux kernel. In writing your shell, you areexpected to use the fork-exec-wait model discussed in class. In particular, you are toimplement the following:• Loop continuously until the user enters quit, which exits your shell.• Inside the loop, you will print your "minor5" prompt and read in the user’scommand, which may consist of a Linux command with 0 or more options andarguments supported by the command. You are expected to read in and processonly 1 command at a time with no pipelining or redirection.• In a child process, you are to execute the command as given, including alloptions and arguments given. If the command is not valid, rather than display an"exec failed" message as shown in class examples, you will simply print outthe command itself with "command not found" as shown in the SAMPLEOUTPUT and then exit the child process. The parent process should wait for thechild process to finish. If you have any questions about this, please contact your instructor, TAs, or IAsassigned to this course to ensure you understand these directions. SAMPLE OUTPUT (user input shown in bold):$ ./a. outminor5> lsa. out grades. txt rec01.txt testdir phone. txt route. txt who. txtdu. txt rec01.c file1 rec01sol. c minor5.cminor5> ls -a -l -ttotal 144-rwx 1 cat0299 cat0299 7835 Oct 14 17:39 a. outdrwx 4 cat0299 cat0299 4096 Oct 14 17:39 .-rw 1 cat0299 cat0299 2665 Oct 14 17:39 minor5.c-rw 1 cat0299 cat0299 33 Oct 5 03:30 du. txt-rw 1 cat0299 cat0299 33 Oct 5 01:28 file1-rw 1 cat0299 cat0299 333 Oct 5 01:02 route. txt

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, silvijaaa
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
image
Computers and Technology, 24.06.2019 12:30, hilario4785
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, naomirice24
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x, y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
You know the right answer?
In this assignment, you will write a complete C program that will act as a simplecommand-line interp...

Questions in other subjects:

Konu
Spanish, 03.06.2021 01:10
Konu
Mathematics, 03.06.2021 01:10