2D Array Creation Question
- From: Matthew Kruer <mkruer@xxxxxxxxx>
- Date: Thu, 31 May 2012 15:37:07 -0700 (PDT)
Is there a better way to create this array?
I know I can do it like this
# Array [Name, Sufix, Fullname]
name=('workflow','application','process','adaptor','event','io')
sufix=('war','jar','jar','jar','jar','jar')
fullname('','','','','','','')
sudo update of array with additional information
for (a=0;a<$name[@];a++)
fullname[a] = `ls -t $name[a]*$sufix[a] | head -1`
done
Ideally I would like it to be like this as it is easier to read.
# Array [name, sufix, fullname]
'workflow', 'war', ''
'application', 'jar', ''
'process', 'jar', ''
'adaptor', 'jar', ''
'event', 'jar', ''
'io', 'jar', ''
Thanks
.
- Follow-Ups:
- Re: 2D Array Creation Question
- From: Matthew Kruer
- Re: 2D Array Creation Question
- From: Ed Morton
- Re: 2D Array Creation Question
- From: Dave Gibson
- Re: 2D Array Creation Question
- Next by Date: split file contents into files
- Next by thread: Re: 2D Array Creation Question
- Index(es):
Relevant Pages
|