[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: |& in bash?
From: |
Dan Douglas |
Subject: |
Re: |& in bash? |
Date: |
Sat, 19 Jan 2013 16:03:12 -0600 |
User-agent: |
KMail/4.8.3 (Linux/3.4.6-pf+; KDE/4.8.3; x86_64; ; ) |
On Saturday, January 19, 2013 02:47:38 PM Chet Ramey wrote:
> On 1/18/13 4:10 PM, Dan Douglas wrote:
>
> > In scripts it breaks POSIX, conflicts with the coproc operator in kshes,
> > applies the redirections in an unintuitive order since the same operator
> > redirects stdout first, then applies the stderr redirect after other
> > redirections. It isn't very common to dump multiple streams into one pipe.
> > I suggest avoiding |&.
>
> It doesn't `break' Posix. Posix doesn't say anything about it, so it's
> simply undefined.
Not necessarily, but I know what you meant.
An operator consisting of a mash-up of syntax that has another meaning
elsewhere isn't necessarily well-formed. Perhaps somebody did find that it's
ok. e.g. the `;|' zsh/mksh case-delimiter is a similar-looking extension.
Syntax in which the only way to write certain compatibility wrappers is to
shield it from parsers through an eval is the least desirable way to extend a
language IMO.
> It's syntactic sugar. A parser macro, if you will.
That makes sense.
--
Dan Douglas
- |& 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, 2013/01/22
- 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