Date: Tue, 23 Jan 2007 21:06:06 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: youshi10@u.washington.edu Cc: freebsd-questions@freebsd.org Subject: Re: [OT] What does this pipe do? (fwd) Message-ID: <20070124030606.GD4120@dan.emsphone.com> In-Reply-To: <Pine.LNX.4.43.0701231844050.28911@hymn03.u.washington.edu> References: <Pine.LNX.4.43.0701231844050.28911@hymn03.u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 23), youshi10@u.washington.edu said: > On Tue, 23 Jan 2007, Robert Huff wrote: > >youshi10@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. > > No similar shortened command for bash/sh, other than &1>/dev/stdout > &2>/dev/stdout? "2>&1 |" is the sh equivalent. Here's a snippet from the from the zsh manpage: A pipeline is either a simple command, or a sequence of two or more simple commands where each command is separated from the next by `|' or `|&'. Where commands are separated by `|', the standard output of the first command is connected to the standard input of the next. `|&' is shorthand for `2>&1 |', which connects both the standard output and the standard error of the command to the standard input of the next. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070124030606.GD4120>