[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #10070] toggle invert flag when reading `!'
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: [patch #10070] toggle invert flag when reading `!' |
Date: |
Thu, 27 May 2021 17:46:41 +0200 |
why doesnt it accept ! after |
On Thu, May 27, 2021, 17:38 Chet Ramey <chet.ramey@case.edu> wrote:
> On 5/27/21 11:20 AM, Andreas Schwab wrote:
> > On Mai 27 2021, Chet Ramey wrote:
> >
> >> On 5/26/21 9:55 PM, Dale R. Worley wrote:
> >>
> >>>> $ ! ! [ 1 -eq 1 ]; echo $?
> >>>> 0
> >>> That last one isn't defined by the manual page. I'm surprised you
> don't
> >>> get a syntax error.
> >>
> >> It's clearly valid.
> >
> > According to the POSIX grammar, a pipeline can only be a pipe_sequence
> > optionally preceded by a single Bang. If you want another Bang the
> > pipe_sequnce needs to be either a subshell or a brace_group.
>
> True, but bash accepts it. (So do ksh and mksh; dash and yash do not.)
>
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>
>
- Re: [patch #10070] toggle invert flag when reading `!', Chet Ramey, 2021/05/24
- Re: [patch #10070] toggle invert flag when reading `!', felix, 2021/05/26
- Re: [patch #10070] toggle invert flag when reading `!', Dale R. Worley, 2021/05/26
- Re: [patch #10070] toggle invert flag when reading `!', Chet Ramey, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Andreas Schwab, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Chet Ramey, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Andreas Schwab, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Chet Ramey, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Andreas Schwab, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!',
Alex fxmbsw7 Ratchev <=
- Re: [patch #10070] toggle invert flag when reading `!', Greg Wooledge, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Alex fxmbsw7 Ratchev, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Andreas Schwab, 2021/05/27
- Re: [patch #10070] toggle invert flag when reading `!', Andreas Schwab, 2021/05/27