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 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Now you’re on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx,fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx,fs) does automatic scaling and then calls sound(xx,fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
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, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01
question
Social Studies, 20.09.2020 02:01
question
English, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01
question
Biology, 20.09.2020 02:01
question
Computers and Technology, 20.09.2020 02:01
Questions on the website: 13722362