Write a C program in simtee.c that is a simplified version of tee. It should take exactly one argument () and, using system calls, copy the standard input to the stan- dard output as well as to...


Write a C program in simtee.c that is a simplified version of tee. It should take exactly<br>one argument (<outfile>) and, using system calls, copy the standard input to the stan-<br>dard output as well as to outfile. If outfile already exists, it should be overwritten; the<br>file should be created if it does not exist.<br>Note: Multiline input is allowed. The user should use Ctr+D to indicate end of input.<br>

Extracted text: Write a C program in simtee.c that is a simplified version of tee. It should take exactly one argument () and, using system calls, copy the standard input to the stan- dard output as well as to outfile. If outfile already exists, it should be overwritten; the file should be created if it does not exist. Note: Multiline input is allowed. The user should use Ctr+D to indicate end of input.
Note: simtee doesn't need to provide any of the options made available by tee.<br>An error message should be displayed if no file name is provided as argument (see Listing 1).<br>Listing 1: simtee should take exactly one argument.<br>$ . /simtee.out<br>usage:<br>simtee <file><br>

Extracted text: Note: simtee doesn't need to provide any of the options made available by tee. An error message should be displayed if no file name is provided as argument (see Listing 1). Listing 1: simtee should take exactly one argument. $ . /simtee.out usage: simtee

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here