On Thu, Feb 26, 2015 at 2:40 AM, Milo H. Fields <mfie...@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.