[net.unix-wizards] 'Sh' question related to redirecting

lrr@gypsy.UUCP (06/05/85)

It appears that if you say:

	program 2>&1 | program

then the standard error output of the first program is put into the
pipeline to the second program.  This works with the Bourne Shell on 4.2
from Sun.

Larry Rogers
Siemens Research and Technology Laboratories
Princeton, NJ 08540
princeton!siemens!jaguar!lrr
609 734 6559

guy@sun.uucp (Guy Harris) (06/07/85)

> It appears that if you say:
> 
> 	program 2>&1 | program
> 
> then the standard error output of the first program is put into the
> pipeline to the second program.  This works with the Bourne Shell on 4.2
> from Sun.

It's a documented feature of "sh", so it damn well better work on Suns and
every other UNIX implementation in existence.

	Guy Harris