From owner-freebsd-questions@FreeBSD.ORG Wed Jan 24 03:06:14 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C92216A40D for ; Wed, 24 Jan 2007 03:06:14 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 67E3B13C45E for ; Wed, 24 Jan 2007 03:06:14 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id l0O366Kn094089; Tue, 23 Jan 2007 21:06:06 -0600 (CST) (envelope-from dan) Date: Tue, 23 Jan 2007 21:06:06 -0600 From: Dan Nelson To: youshi10@u.washington.edu Message-ID: <20070124030606.GD4120@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 6.2-PRERELEASE User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-questions@freebsd.org Subject: Re: [OT] What does this pipe do? (fwd) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 03:06:14 -0000 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