Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process reverses the case
Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process reverses the case of each character in the message and sends it back to the first process. For example, if the first process sends the message Hi There, the second process will return hI THERE. This will require using two pipes, one for sending the original message from the first to the second process and the other for sending the modified message from the second to the first process. Write this program using UNIX pipes. The code should read the string message as a single line from a file name provided on the command line. The output should be the original string on a line and the processed string on the second line. All output should be done in the "first process. i.e., the process that modifies the string should not print any output. For example: # ./a.out string.txt Hi There hI THERE Contents of string.txt file Hi There Section 3.7.4.1 from 10e, or 3.6.3.1 from 9e of the book contains example code which may be used as a starting point
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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