Arrays

The Bash shell makes it possible to create arrays:

https://gnu.org/software/bash/manual/html_node/Arrays

POSIX shell currently does not have this feature. A workaround is to use ARGV:

  $ set aaa bbb ccc
  $ echo "$2"
  bbb

However this is limited as only one array can exist at a time, while Bash allows
multiple arrays to exist at a time:

  $ gg=(aaa bbb ccc)
  $ hh=(ddd eee fff)
  $ echo "${gg[1]} ${hh[1]}"
  bbb eee

I think arrays are an important part of any language and should be considered
for inclusion into the POSIX standard.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_02

Reply via email to