bug-bash
[Top][All Lists]
Advanced

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

RE: bang-hash behavior change?


From: Milo H. Fields
Subject: RE: bang-hash behavior change?
Date: Thu, 26 Feb 2015 10:29:25 -0500

Sorry I wasn’t clear – my sh is linked to bash… however forcing the use of ‘bash’ returned expected results..

appears newer bash versions are better at mirroring actual sh behavior when invoked as ‘sh’ good to know..

 

thx

 

From: bug-bash-bounces+mfields=paladin-sys.com@gnu.org [mailto:bug-bash-bounces+mfields=paladin-sys.com@gnu.org] On Behalf Of Pierre Gaston

Sent: Thursday, February 26, 2015 03:14

To: Milo H. Fields

Cc: bug-bash@gnu.org

Subject: Re: bang-hash behavior change?

 

 

 

On Thu, Feb 26, 2015 at 2:40 AM, Milo H. Fields <mfields@paladin-sys.com> 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: ${!#}"

 

bash 4.3.33 (and others)

$ sh jnk arg1 arg2

plain: !#

parents:

 

bash 4.1.17:

$ sh jnk arg1 arg2

plain: !#

parents: arg2

 

Is this a bug?

 

 

what if you use "bash" instead of "sh"?

maybe your sh is not really bash and in any case you should use bash if you rely on bash features.


reply via email to

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