[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: excess braces ignored: bug or feature ?
From: |
Dan Douglas |
Subject: |
Re: excess braces ignored: bug or feature ? |
Date: |
Fri, 17 Feb 2012 17:22:52 -0600 |
User-agent: |
KMail/4.7.4 (Linux/3.1.6-pf; KDE/4.7.4; x86_64; ; ) |
On Friday, February 17, 2012 02:51:27 PM Mike Frysinger wrote:
> can't tell if this is a bug or a feature.
>
> FOO= BAR=bar
>
> : ${FOO:=${BAR}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
>
> echo $FOO
>
> i'd expect an error, or FOO to contain those excess braces. instead, FOO is
> just "bar".
> -mike
My favorite is probably the parser ignoring any valid redirection syntax with
the special command substitutions.
~ $ { echo "$({xxxxxxxxxxxxxxxxxxxx}</dev/stdin)"; } <<<'hi'
hi
~ $ { echo "$(1111111111111111111111</dev/stdin)"; } <<<'hi'
hi
That one really is ignored. No variable named xxx... is actually set.
--
Dan Douglas
signature.asc
Description: This is a digitally signed message part.
Re: excess braces ignored: bug or feature ?, Chet Ramey, 2012/02/19