[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: |& in bash?
From: |
Andreas Schwab |
Subject: |
Re: |& in bash? |
Date: |
Tue, 22 Jan 2013 19:45:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) |
Greg Wooledge <wooledg@eeg.ccf.org> writes:
> On Tue, Jan 22, 2013 at 06:56:31AM -0500, Steven W. Orr wrote:
>> By that logic,
>>
>> foo 2>&1 | bar
>>
>> should not work, but it does. It takes stderr and dups it to stdout, and
>> *then* takes stdout and send it to a pipe.
>
> Incorrect. The pipeline is created first, and *then* the dup (2>&1) is
> performed.
This is true, but not obviously so. If you have the rule "redirections
are processed from left to right", then this looks like an outlier (if
you treat the pipe as another kind of redirection).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- |& in bash?, John Caruso, 2013/01/17
- Re: |& in bash?, Chet Ramey, 2013/01/17
- Message not available
- Message not available
- Re: |& in bash?, John Caruso, 2013/01/21
- Re: |& in bash?, Steven W. Orr, 2013/01/22
- Re: |& in bash?, Greg Wooledge, 2013/01/22
- Re: |& in bash?, Bob Proulx, 2013/01/22
- Re: |& in bash?,
Andreas Schwab <=
- Re: |& in bash?, DJ Mills, 2013/01/22
- Re: |& in bash?, Andreas Schwab, 2013/01/23
- Re: |& in bash?, Greg Wooledge, 2013/01/22
- Re: |& in bash?, Bob Proulx, 2013/01/22
- Re: |& in bash?, Linda Walsh, 2013/01/26