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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
You know the right answer?
In this assignment, you will write a complete C program that will act as a simplecommand-line interp...
Questions
question
Mathematics, 06.04.2021 02:30
Questions on the website: 13722363