Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multidimensional array

Status
Not open for further replies.
Joined
Mar 31, 2004
Messages
151
Location
US
Hello

I want to read a multidimensional array like this

/home input
testh1 test2
testh3 test4
testh5 test6
testh7 test8

The # lines and fields are not constant. Next step is to idenify each row and column. Can somebody help?


I was using this

Code:
	cat $DIR/files.dat | awk '{
          if (max_nf < NF)
               max_nf = NF
          max_nr = NR
          for (x = 1; x <= NF; x++)
               vector[x, NR] = $x
     }
 
Something like this ?
vector[x","NR] = $x

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top