Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4: Compile and test the program below. Then, add what is needed to make it capable to run commands with arguments (A line will

 

image text in transcribed

Question 4: Compile and test the program below. Then, add what is needed to make it capable to run commands with arguments (A line will contain a command name and its possible arguments). #include #include #include #include #include #include #include int readLine(int, char *, int); int main(int arge, char *argv[]){ // To execute int status=0, n; // commands with no arguments char line [255]; char prompt [30]="Enter your command here>"; while(1) { write(STDIN_FILENO, prompt, 25); n=readLine(STDIN_FILENO, line, 255); if( n #include #include #include #include #include #include int readLine(int, char *, int); int main(int arge, char *argv[]){ // To execute int status=0, n; // commands with no arguments char line [255]; char prompt [30]="Enter your command here>"; while(1) { write(STDIN_FILENO, prompt, 25); n=readLine(STDIN_FILENO, line, 255); if( n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions