bug-bash
[Top][All Lists]
Advanced

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

Re: bang-hash behavior change?


From: Chet Ramey
Subject: Re: bang-hash behavior change?
Date: Thu, 26 Feb 2015 12:24:01 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 2/25/15 7:40 PM, Milo H. Fields wrote:
> Greetings,
> 
> I noticed that the ‘bang-hash’  behavior seems to have changed somewhere
> between bash version 4.1.17 and 4.3.33.
> 
>  
> 
> e.g. for the script ‘jnk’ containing:
> 
> echo "plain: !#"
> echo " parens: ${!#}"

It changed for Posix mode between bash-4.1 and bash-4.2, specifically in
mid-October 2010.  According to Posix, ${!#} and ${!?} are discrete word
expansions (removing prefix pattern and displaying an error if unset,
respectively) involving the $! parameter.

Chet
-- 
``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]