bug-bash
[Top][All Lists]
Advanced

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

Re: excess braces ignored: bug or feature ?


From: Chet Ramey
Subject: Re: excess braces ignored: bug or feature ?
Date: Sun, 19 Feb 2012 14:46:58 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 2/17/12 2:51 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".

Neither.  That's just how parameter expansion works.  The braces are
contained in the remainder of the word expansion.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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