Why busybox ash do not support $[ ] for math?

Ron Yorston rmy at pobox.com
Sun Jul 18 07:27:32 UTC 2021

Roberto A. Foglietta wrote:
> why busybox ash do not support $[ ] for math?
> Possibly because original ash does not support it but bash only?
> Have you ever thought about adding this feature or $(( )) is enough?

The $[...] form of arithmetic expansion has been deprecated since
bash 2.0.  It isn't mentioned in the current reference manual and
the Bash Hackers Wiki recommends not using it.

Only the $((...)) form is supported in POSIX.

All things considered, $[...] doesn't seem to be a very attractive
candidate for inclusion in BusyBox ash.


More information about the busybox mailing list