Re: doesn't bash do variable subst. or quote removal on function stateme
From:
Chet Ramey
Subject:
Re: doesn't bash do variable subst. or quote removal on function statement
Date:
Wed, 13 Jan 2016 10:41:40 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 1/12/16 4:33 PM, Linda Walsh wrote:
>
>
> Greg Wooledge wrote:
>> On Tue, Jan 12, 2016 at 11:52:47AM -0800, Linda Walsh wrote:
>>
>>> Also, from a documentation standpoint, not all behaviors are documented
>>> in the manpage, like:
>>>
>>> echo $[1+2]
>>>
>>> as far as I can tell, isn't documented, yet not supporting
>>> its behavior would break many older scripts....
>>>
>>
>> That syntax has been deprecated for at least 15 years.
> ---
> But why? It's less noisy than any alternative.
> It's not as if I can type echo $(1+2) and expect it to work.
Because it only ever appeared in a Posix draft standard, and there's no
reason not to use the standard syntax.
--
``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/