[Wolves] Bash nesting arrays
Andy Smith
andy at strugglers.net
Wed Jan 6 18:26:21 UTC 2016
Hi Simon,
On Wed, Jan 06, 2016 at 02:36:03PM +0000, Simon Burke wrote:
> If someone can tell me a more efficient way of doing this, I’d be
> grateful.
As you've realised there aren't multidimensional arrays in bash.
Personally I would never try to do something this complicated in
bash, but I have seen existing scripts which use both your method
(special delimiter to separate the other dimension) and this one:
http://stackoverflow.com/a/16487733/1394607
I would tend to prefer that one if it absolutely had to be bash.
Cheers,
Andy
--
http://bitfolk.com/ -- No-nonsense VPS hosting
More information about the Wolves
mailing list