I am using an array (clmlist01). I have 61 of these and have 4 or more references to each one in a block of code that I do not want to have to hardcode 61 times. With that being said, I am creating a varible and going through a for loop to create the actual name of each array. The arrays would end up being cmlist01, cmlist02, cmlist03, etc. I don't have any problem creating the variables, but I seem to be doing something wrong in the syntax because if I use ${#cmlist01[@]} it gives me 11, but if I try to resolve the variable substituion name (listnbr), it resoves to cmlist01, but the ${#listnbr[@]} always returns 1. Is it possible to do what I am trying, or do you have to always hardcode the actual array name (instead of resoving it on the fly)? Help with the syntax please!
kaitlyn 0 Newbie Poster
thekashyap 193 Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.