How to pipe stderr to a command in Bourne or Korn shell

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Oct 10 06:26:35 AEST 1990


In article <668 at atcmpe.atcmp.nl> henk at atcmp.nl (Henk M. Keller) writes:
> 	3>&1 will probably be implemented as
> 		close(3);	/* To ensure 3 is free */
> 		fcntl(1, F_DUPFD, 3);	/* Returns lowest possible   */
> 					/* 'dup'ed file descr. >= 3  */

Or dup2(1,3).

---Dan



More information about the Comp.unix.shell mailing list