Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Write a C program that prompts the user for two commands

Write a C program that prompts the user for two commands

Computer Science

Write a C program that prompts the user for two commands. Each input string should be a UNIX command, with arguments allowed. For example, input one could be "ls -l," and input two could be "wc -c." The program will then create a pipe and two child processes. The first child process will run the command specified in the first input. It will output to the pipe instead of standard output. The second child process will run the command specified in the second input. It will take its input from the pipe rather than standard input.The parent process will wait on its two children to complete, then the whole thing willrepeat. Execution will stop when "quit" is entered as the first command.

 

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions