Help with writing a tee program in 4 hours

view story

http://www.unix.com – 1. The problem statement, all variables and given/known data: Basic Assignment Write a program similar to the Unix "tee" command. Program The Unix "tee" command is used to pull out copies of a data stream. It is typically used in conjunction with pipes (analogous to a T-joint in plumbing, hence the name). It takes all data from the standard input and copies it to the standard output, but also copies it into files named as its arguments. For example, the command cat myfile | tee a b c | lpr -P csl would take the data coming from the cat side of the pipe and store it in the (HowTos)