[wellylug] arrays in bash?

Gerald Roehrbein Gerald.Roehrbein at oraforecast.com
Mon May 28 10:41:45 NZST 2007


Hello Sigurd,

I'm a little bit late. :-( I recommend using advanced bash guide written
by Mendel Cooper. It's an excellent source for all bash related
programming questions. 

http://www.linux.com/guides/abs-guide/

I've just copied it to an USB stick to have access wherever and whenever
required.


kind regards
Gerald




Am Dienstag, den 22.05.2007, 13:27 +1200 schrieb Sigurd Magnusson:
> SilverStripe
> 
> how do iterate of an array in bash?
> 
> 
> e.g. can someone change this psuedocode into bash... :)
> 
> myarray = ("fish", "yuck"),
> ("chocolate", "yum"),
> ("icecream", "yum")
> 
> for food in $myarray; do
> echo I think that $food is $myarray[$food]
> done
> 
> Sigurd Magnusson | Operations Director
> 
> 
> SilverStripe
> http://www.silverstripe.com 
> 
> Phone:
> +64 4 978 7332
> Mobile:
> +64 21 421 208
> Skype:
> 
> Level 3
> 97-99 Courtenay Place
> Wellington, New Zealand 
> 
> 




More information about the wellylug mailing list