RosettaCodeData/Task/Associative-array-Iteration/AWK/associative-array-iteration-1.awk

11 lines
141 B
Awk
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
BEGIN {
a["hello"] = 1
a["world"] = 2
a["!"] = 3
# iterate over keys, undefined order
for(key in a) {
print key, a[key]
}
}