Is it possible to initialize an array like this in AWK ?
Colors[1] = ("Red", "Green", "Blue")
Colors[2] = ("Yellow", "Cyan", "Purple")
And then to have a two dimensional array where Colors[2,3]=”Purple”.
From another thread I understand that it’s not possible ( “sadly, there is no way to set an array all at once without abusing split()” ). Anyways I want to be 100% sure and I’m sure that there are others with the same question.
I am looking for the easiest method to initialize arrays like the one above, will be nice to have it well written.
Thanks for the answers.
Anyways, for those who want to initialize unidimensional arrays, here is an example: