Oct 19, 2005 #1 smicro MIS Dec 26, 2002 281 US Anyone know how to redirect output of a command to two separate files? Basically what I'm trying to do is make multiple copies of a file. I tried (cp -p errormail > errormail2) >errormail3 but doesnt seem to work. Any help would be great. Thanks!
Anyone know how to redirect output of a command to two separate files? Basically what I'm trying to do is make multiple copies of a file. I tried (cp -p errormail > errormail2) >errormail3 but doesnt seem to work. Any help would be great. Thanks!
Oct 19, 2005 1 #2 MadMichael Programmer Sep 30, 2004 130 US You need something like: cat inputfile | tee outputfile1 > outputfile2 As far as I know, the copy command doesn't put _anything_ to standard output, so your redirect there has absolutely no effect. Upvote 0 Downvote
You need something like: cat inputfile | tee outputfile1 > outputfile2 As far as I know, the copy command doesn't put _anything_ to standard output, so your redirect there has absolutely no effect.
Oct 20, 2005 Thread starter #3 smicro MIS Dec 26, 2002 281 US Thanks MM, Is it possible to add an outputfile3 to that? Thanks. Upvote 0 Downvote