bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #10070] toggle invert flag when reading `!'


From: Andreas Schwab
Subject: Re: [patch #10070] toggle invert flag when reading `!'
Date: Thu, 27 May 2021 17:43:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

On Mai 27 2021, Chet Ramey 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.

The manual doesn't document that extension, though.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]