What I'm trying to do, is emulate a 2D array in a bash script on my application. (I'm an idiot for writing it in bash, but I'll re-write it once I have a working copy before my deadline)
My server.data file that I want to read from:
1:hello:there
2:im:a
3:computing:system
I know PHP ALOT better than bash, but here's a pseudo code of what I mean
foreach(line in server.data) {         
 arr = explode(":", server.data)  
  echo arr[0]    
  echo arr[1]  
  echo arr[2]  
  echo \n  
}
Would return these values:
1 hello there
2 im a
3 computing system
Can someone write a small bash script, explaining how to place each line into an array?
 
     
     
     
     
    