Is there any way(besides building a reversed array)
to get at the subscript strings of an awk array?
Say:
array[string1]
array[string2]
for (i in array) {
if (i ~ /.*2/) {
print array
}
}
Of course I know how awk keeps it's indices and arrays.
I am just saying that without a construct like:
array[1] = "string1"
array[2] = "string2"
On the other side of the array and an option
passed back and forth in the function call to activate
the reverse lookup of subscripts is there an easier
way anyone has ever used or seen to access subscript
literals?
to get at the subscript strings of an awk array?
Say:
array[string1]
array[string2]
for (i in array) {
if (i ~ /.*2/) {
print array
}
}
Of course I know how awk keeps it's indices and arrays.
I am just saying that without a construct like:
array[1] = "string1"
array[2] = "string2"
On the other side of the array and an option
passed back and forth in the function call to activate
the reverse lookup of subscripts is there an easier
way anyone has ever used or seen to access subscript
literals?