[svlug] bash i/o redirect: stdout & stderr to file *AND* stderr to tty?

kmself@ix.netcom.com kmself at ix.netcom.com
Wed May 17 14:37:24 PDT 2000


On Wed, May 17, 2000 at 12:24:02PM -0700, Emmanuel-Robert Mayssat wrote:
> Try 
> touch log; ./test 2>&1 | tee -a log
> it seems to work !
> 
> NOTE: 
> Your redirection seems to be wrong.

Try running it.  It works as advertised.

> 2 stderr is redirected to 1 ( current stdout = tty )
> 3 is never used, unless you create a stream to fd=3 ( by default 3 is not 
> created )
> 
> 1>&3 redirect stdout but not stderr which is still pointing to tty

-- 
Karsten M. Self <kmself at ix.netcom.com>         http://www.netcom.com/~kmself
  What part of "Gestalt" don't you understand?       Debian GNU/Linux rocks!
    http://gestalt-system.sourceforge.net/    Rusty? http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595  DC61 3847 889F 55F2 B9B0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.svlug.org/archives/svlug/attachments/20000517/a75e5a09/attachment.bin


More information about the svlug mailing list