fpb@ittc.wec.com (Frank P. Bresz) (09/12/90)
Hi There, I am trying to get the following csh-like behavior in sh. foo |& tee junk This will take the output and the errors from the program foo and save everything together in the file junk as well as sending it to the screen. I want a /bin/sh solution please. Not perl, not bash, not anything that won't work on a virgin Sun machine i.e. without anything but what Sun gives you. -- Frank P. Bresz | Westinghouse Electric Corporation () () () fpb@ittc.wec.com | ITTC Simulators Department \ /\ / uunet!ittc!fpb | Those who can, do. Those who can't, simulate. \/ \/ (412)733-6749 | @disclaimer(My opinions are my own, ---------- Fx:(412)733-6444 | I don't earn enough to issue "official" opinions for WEC)
meissner@osf.org (Michael Meissner) (09/13/90)
In article <FPB.90Sep12113235@schlitz.ittc.wec.com> fpb@ittc.wec.com (Frank P. Bresz) writes: | Hi There, | | I am trying to get the following csh-like behavior in sh. | | foo |& tee junk | | This will take the output and the errors from the program foo and | save everything together in the file junk as well as sending it to the | screen. I want a /bin/sh solution please. Not perl, not bash, not anything | that won't work on a virgin Sun machine i.e. without anything but what Sun | gives you. foo 2>&1 | tee junk will do the job in anything that calls itself Bourne compatible. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Do apple growers tell their kids money doesn't grow on bushes?
alaa@hjuxa (35G-ZEINELDINE) (09/18/90)
From article <FPB.90Sep12113235@schlitz.ittc.wec.com>, by fpb@ittc.wec.com (Frank P. Bresz): > > I am trying to get the following csh-like behavior in sh. > > foo |& tee junk The following should work for the Bourne shell: foo 2>&1 | tee junk alaa