Question: pipes_process1.c : pipes_processes2.c : scores: Please code in C 2. Chaining Processes together using two Pipes Example Program of chaining processes together using two Pipes


pipes_process1.c :




pipes_processes2.c :


scores:

Please code in C
2. Chaining Processes together using two Pipes Example Program of chaining processes together using two Pipes This following C program in (pipes_processes2.c) creates two processes P1 (Parent - executes cat ) and P2 (Child - execute grep ). One the command line a user would be executing the command cat scores grep Lakers . The output of cat scores would be the input to grep Lakers , chaining the two programs together. In this quick-and-dirty software implementation of the command line example the parent doesn't wait for the child to finish and so the command prompt may reappear before the child terminates. Example: cat scores grep 28 Output Indiana 45 28.616 Houston 44 28.611 Oklahoma City 44 28.611 Utah 44 28.611 Task Modify the code in a new file (pipes_processes3.c) to take one argument from the command line using argc and argv that is the argument passed to the grep program (e.g. Lakers or 28), then create three processes P1 (Parent - executes cat scores ) and P2 (Child - execute grep
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
