Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Rewrite the following UNIX utility in C . C++ is NOT allowed. Note: parameters in [ ] are optional, parameters in are required. The l
Rewrite the following UNIX utility in C. C++ is NOT allowed.
Note: parameters in [ ] are optional, parameters in are required. The l (pipe) means or." new_cat (10 points) -Usage: .ew cat [file.txt] If the [file.txt] argument is passed, open the file and print it to stdout. If there is no second argument, repeat what the user types on stdin back to stdout (until the user hits CTRL+D to indicate EOF). Make sure to compare your output to cat. Note this is not exactly like cat: only one file argument should be accepted, and we are not implementing the various command line flags. -Make sure to fail gracefully if the file does not exist or if> 2 arguments are passed. the f the rie oeStep 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