bug-bash
[Top][All Lists]
Advanced

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

Re: 'wait -n' with and without id arguments


From: Grisha Levit
Subject: Re: 'wait -n' with and without id arguments
Date: Sun, 20 Oct 2024 22:30:32 -0400

On Sun, Oct 20, 2024, 20:52 Zachary Santer <zsanter@gmail.com> wrote:

>
> Item 8 is just odd and is on the verge of being a dealbreaker. Not to
> go off on another tangent, but what on Earth?
>

AFAICT it's the non-POSIX-mode Bash behavior that is unusual.

While all shells will have treat single quotes as literal here:

    $ V=set
    $ echo "${V+'x'}"
    'x'

Pretty much every other shell (and bash in posix mode) will continue to do
so for:

    $ echo "${V+'x}"
    'x

...while bash will treat this as an unterminated command.  Because in bash,
this is a weird kind of quoting, where the quotes are preserved but any }
character within them loses its special meaning:

    $ unset U
    $ (set +o posix; echo "${U+'}'y}")

    $ (set -o posix; echo "${U+'}'y}")
    'y}

>


reply via email to

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