Hacker News new | past | comments | ask | show | jobs | submit login

$[...] also establishes an arithmetic context, so

  $[RANDOM % 10]
works fine – but you're right, $[...] is not even mentioned in the manual any longer. The release notes[1] say that it's "no longer supported" in the changes for Bash 2.0 (that's 1996!), and Chet Ramey talks about it in the bug-bash mailing list[2].

[1]: http://tiswww.case.edu/php/chet/bash/NEWS

[2]: https://lists.gnu.org/archive/html/bug-bash/2012-04/msg00034...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: