How to get better piping in sh

Michael Meissner meissner at osf.org
Thu Sep 13 05:24:12 AEST 1990


In article <FPB.90Sep12113235 at schlitz.ittc.wec.com> fpb at 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 at 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?



More information about the Comp.unix.shell mailing list