[OT] What does this pipe do?
Oliver Fromme
olli at lurza.secnetix.de
Wed Jan 24 15:47:42 UTC 2007
Robert Huff wrote:
> youshi10 at u.washington.edu writes:
> > I know this is a Unix shell command, and off-topic, but I'm
> > curious. I've been reading a few 'make' commands at work that end
> > in "|&" and I was wondering if that redirection string is
> > synonymous to "| /dev/stdout".
>
> That's (t)csh-speak for "send both stdout and stderr to the
> pipe". '|' only covers stdout.
Just for completeness, ">&" (file) and ">|" (pipe) are also
supported by zsh (which is a bourne-shell like sh, ksh or bash).
In fact it's simply a shortcut for "2>&1" (which means to dup
descriptor 2 [=stderr] to desciptor 1 [=stdout]).
The effect is, as several people have pointed out, to redirect
both stdout and stderr to the same file or pipe, respectively.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"That's what I love about GUIs: They make simple tasks easier,
and complex tasks impossible."
-- John William Chambless
More information about the freebsd-questions
mailing list