RosettaCodeData/Task/Associative-array-Iteration/AWK/associative-array-iteration-1.awk
2023-07-01 13:44:08 -04:00

10 lines
141 B
Awk

BEGIN {
a["hello"] = 1
a["world"] = 2
a["!"] = 3
# iterate over keys, undefined order
for(key in a) {
print key, a[key]
}
}