Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i just post this question more than 1 0 times and all the answers is incorrect and just do copy paste from chatgpt, why i
i just post this question more than times and all the answers is incorrect and just do copy paste from chatgpt, why i spent my money for this app if you just ask chatgpt and all the answers in incorect this make me soooo angry, the answers is just repeated and all the answers incorrect. this app is realy bad, they even not read my question can you image i spent money for nothing. please please please do not answer silly answer or get answer from chatgpt, sorry to say if you do i will put dislike and do report for your answer. this code in c for linux that make a simple shell that apply: semicolon, enviroment variable, and pipe. you have to edit the code and the code have to run perfectly with trying it and add the test that you check the code with your answer but have to answer full answer for all the requermnts and all the commands. In this exercise, the following elements must be added to the last exercise : Pipe support one or more Support for Support for Support for ctrlZ bg Additional edge case support Exercise definition: In this exercise the following elements must be added: Support for a pipe or a thread of several. We saw the explanation for the implementation and initial code in the lesson On the edge of a fork: for example, an explanation for a pipe board when the command "left right" is entered, a pipe and processes must be created. When the first process will route the standard output into the pipe and run the "left" command. The second process will route the standard input from the pipe and run the command "right" and the rest in induction. Remarks: The character must be supported One or more separators between different commands. Commands can contain hyphens. echo hi os wc c Any number of spaces may appear between the commands and the character, and there may be no spaces at all. For example: ls lwc for example: ls l wc l ls lwc l When using PIPE it is not possible to assume that the commands are correct and exist. ie for example, not a situation of aaaaaa sort program will issue an error message For the avoidance of doubt there may of course be no pipes at all. That is a single command must also be supported, as in the previous exercise. And in combinations with;..... in general, all the things that worked in exercise should work. support for We talked about the implementation of in the lecture it is not complicated basically all that is required to change from exercise is to cancel the wait in the parent when it is recognized that the user has pressed at the end of the command. and allow the loop to receive more commands from the user... where do you have to do the wait! Support for ctrlZ bg We also talked about the implementation of ctrlZ bg in the lecture it's not complicated we need to support only one such process of CtrlZ and bg in sequence. Relief for example twice in a row CtrlZ and CtrlZ and then bg and bg it is possible to assume that you will not receive Remember to free processes from "zombie" mode when does this happen! support for As we discussed in the lesson, support for threading should be added to the file thread. Edge case If you did not support the following edge case in exercise then check that they are Working. Semicolon inside commas Quotation marks only quotation marks immediately after a variable name echo VAR john echoVARadf johnadf echo asdf ; asdf" ; ls asdf ; asdf A A A A B BB C CC DD F FI Home VARjohn echoVARadf johnadf Remember to check for memory leaks with valgrind. the code: #include #include #include #include #include #define MAXCMDLEN #define MAXARGS #define MAXPROMPTSIZE int main int entercount ; Counter for empty commands int cmdcount ; Counter for total commands executed int argcount ; Counter for total arguments passed to commands char cmdMAXCMDLEN; Buffer to hold user input command char argsMAXARGS ; Array to store parsed arguments char cwdMAXPROMPTSIZE; Buffer to hold current working directory char promptMAXPROMPTSIZE; Buffer to hold the shell prompt while Display prompt getcwdcwd sizeofcwd; Get current working directory snprintfprompt sizeofprompt#cmd:
i just post this question more than times and all the answers is incorrect and just do copy paste from chatgpt, why i spent my money for this app if you just ask chatgpt and all the answers in incorect this make me soooo angry, the answers is just repeated and all the answers incorrect. this app is realy bad, they even not read my question can you image i spent money for nothing. please please please do not answer silly answer or get answer from chatgpt, sorry to say if you do i will put dislike and do report for your answer. this code in c for linux that make a simple shell that apply: semicolon, enviroment variable, and pipe. you have to edit the code and the code have to run perfectly with trying it and add the test that you check the code with your answer but have to answer full answer for all the requermnts and all the commands. In this exercise, the following elements must be added to the last exercise : Pipe support one or more Support for Support for Support for ctrlZ bg Additional edge case support Exercise definition: In this exercise the following elements must be added: Support for a pipe or a thread of several. We saw the explanation for the implementation and initial code in the lesson On the edge of a fork: for example, an explanation for a pipe board when the command "left right" is entered, a pipe and processes must be created. When the first process will route the standard output into the pipe and run the "left" command. The second process will route the standard input from the pipe and run the command "right" and the rest in induction. Remarks: The character must be supported One or more separators between different commands. Commands can contain hyphens. echo hi os wc c Any number of spaces may appear between the commands and the character, and there may be no spaces at all. For example: ls lwc for example: ls l wc l ls lwc l When using PIPE it is not possible to assume that the commands are correct and exist. ie for example, not a situation of aaaaaa sort program will issue an error message For the avoidance of doubt there may of course be no pipes at all. That is a single command must also be supported, as in the previous exercise. And in combinations with;..... in general, all the things that worked in exercise should work. support for We talked about the implementation of in the lecture it is not complicated basically all that is required to change from exercise is to cancel the wait in the parent when it is recognized that the user has pressed at the end of the command. and allow the loop to receive more commands from the user... where do you have to do the wait! Support for ctrlZ bg We also talked about the implementation of ctrlZ bg in the lecture it's not complicated we need to support only one such process of CtrlZ and bg in sequence. Relief for example twice in a row CtrlZ and CtrlZ and then bg and bg it is possible to assume that you will not receive Remember to free processes from "zombie" mode when does this happen! support for As we discussed in the lesson, support for threading should be added to the file thread. Edge case If you did not support the following edge case in exercise then check that they are Working. Semicolon inside commas Quotation marks only quotation marks immediately after a variable name echo VAR john echoVARadf johnadf echo asdf ; asdf" ; ls asdf ; asdf A A A A B BB C CC DD F FI Home VARjohn echoVARadf johnadf Remember to check for memory leaks with valgrind. the code: #include #include #include #include #include #define MAXCMDLEN #define MAXARGS #define MAXPROMPTSIZE int main int entercount ; Counter for empty commands int cmdcount ; Counter for total commands executed int argcount ; Counter for total arguments passed to commands char cmdMAXCMDLEN; Buffer to hold user input command char argsMAXARGS ; Array to store parsed arguments char cwdMAXPROMPTSIZE; Buffer to hold current working directory char promptMAXPROMPTSIZE; Buffer to hold the shell prompt while Display prompt getcwdcwd sizeofcwd; Get current working directory snprintfprompt sizeofprompt#cmd:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started