program in C/C++ which is passed as command line

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.4: File Streams As Function Arguments
Problem 1E
icon
Related questions
Question

Write a program in C/C++ which is passed as command line argument a file name. Your program will read data from the file using read system call. The program will then pass the contents of the file to a pipe and create a child process. The child process will read the file’s content from the pipe.The child process does two things to the file data: 1) it removes all integers from the pipe. 2) It changes the case of all alphabets. The child process then writes the modified file data to the second pipe. The parent then reads this data from the second pipe andwrites the data(using write system call)to a new filewhose name is also passed as command line argument.The input file from which the data will be read has no size restriction.

 

Sample file could have data like: M7 9am3 1k H23is e750n

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr