[Top][All Lists]

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

Re: doesn't bash do variable subst. or quote removal on function stateme

From: Linda Walsh
Subject: Re: doesn't bash do variable subst. or quote removal on function statement
Date: Tue, 12 Jan 2016 13:33:16 -0800
User-agent: Thunderbird

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.

  Nobody is
supposed to be using it.  It's undocumented ON PURPOSE, to try to make
people stop doing it.

If you have older scripts that use it, fix them now.
Only in 3rd party scripts where scripts come with some product to be used on *nix, which is why I worry about it. I wouldn't want those scripts to become
my responsibility to "fix".

Though, at one point, I seem to remember some wondering when systemd might
integrate a shell-service as it has many other *nix utils (somewhere around
the time it was integrating code to replace 'su' or 'sudo', I think). If that
happens, then it's clear where compatibility will go.

reply via email to

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