Arrays

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

 



The Bash shell makes it possible to create arrays:

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

Dash 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




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux