Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 13:13:00 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        freebsd-questions@freebsd.org
Subject:   basic sh(1) question
Message-ID:  <200005302013.NAA33987@bubba.whistle.com>

next in thread | raw e-mail | index | archive | help
In sh(1), how do I make both the stdout and stderr output of a command
get piped together into another command?

For output to a file, you do this:

  $ cmd1 >file 2>&1 

So you'd think the same thing would work for output to another command,
but it doesn't:

  $ cmd1 |cmd2 2>&1 

Thanks,
-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005302013.NAA33987>