subject

In this assignment, you will write a complete C program that will act as a simple
command-line interpreter (i. e., a shell) for the Linux kernel. In writing your shell, you are
expected to use the fork-exec-wait model discussed in class. In particular, you are to
implement 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’s
command, which may consist of a Linux command with 0 or more options and
arguments supported by the command. You are expected to read in and process
only 1 command at a time with no pipelining or redirection.
• In a child process, you are to execute the command as given, including all
options 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 out
the command itself with "command not found" as shown in the SAMPLE
OUTPUT and then exit the child process. The parent process should wait for the
child process to finish.
If you have any questions about this, please contact your instructor, TAs, or IAs
assigned to this course to ensure you understand these directions.

SAMPLE OUTPUT (user input shown in bold):
$ ./a. out
minor5> ls
a. out grades. txt rec01.txt testdir phone. txt route. txt who. txt
du. txt rec01.c file1 rec01sol. c minor5.c
minor5> ls -a -l -t
total 144
-rwx 1 cat0299 cat0299 7835 Oct 14 17:39 a. out
drwx 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: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
How to apply the fly in effect to objects on a slide
Answers: 1
You know the right answer?
In this assignment, you will write a complete C program that will act as a simple
command-lin...
Questions
question
Mathematics, 28.01.2020 00:31
question
Mathematics, 28.01.2020 00:31
Questions on the website: 13722360