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

11 lines
124 B
Awk
Raw Permalink Normal View History

2013-04-10 14:58:50 -07:00
BEGIN {
a["hello"] = 1
a["world"] = 2
a["!"] = 3
# iterate over keys
for(key in a) {
print key, a[key]
}
}