« Return to Thread: status on $[arith] for eval arith vsl $((arith))??

Re: status on $[arith] for eval arith vsl $((arith))??

by Linda Walsh-3 :: Rate this Message:

| View in Thread



Maarten Billemont wrote:

> Any particular reason for not removing old undocumented functionality,


 or is that mostly the nature of this beast - dragging along and maintaining


 ancient code for the sake of compatibility?


----

So 'yesturday' is "ancient" for you?... that's really means something.

In doing a scan over my /usr partition,
I see MANY examples in bash 4.1 in it's examples of using $[] -- I would hardly
call 4.1 "ancient".


Other packages that make use of the syntax:

* wondershaper
* cifs file system
* alsa (sound)
* fonts-config   (this is a new project within the past few years)
* QT4
* GoogleBrowser (chromium)
* RPM
* YP
* PM Utils
* RPMrebuild
* iproute2 (almost all modern internet functions on linux)...
* dhcp-client
- (zsh -- not a real example, but might become alternate system shell if bash
  killed $[] support)
* Opera - ? (has comment "TODO use $(()) instead of $[] whenever possible;...)
"whenever possible??"
* samba
    and a HUGE number in
** linux-kernel -- all over the place...

At that point, I was getting too many to keep up with ... so I stopped searching...

$[] has is -- I would bet, Universally, used MORE than $(())...

Chet -- you should get back to the posix folks and tell them posix is to be
'descriptive of usage' (their words), not prescriptive.   Just because ksh did
it differently from everyone else's usage doesn't mean they should go with that
syntax...

Geez.





 « Return to Thread: status on $[arith] for eval arith vsl $((arith))??