ubuntu-buildroot/output/build/host-gawk-5.2.0/awklib/eg/lib/walkarray.awk

10 lines
214 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
function walk_array(arr, name, i)
{
for (i in arr) {
if (isarray(arr[i]))
walk_array(arr[i], (name "[" i "]"))
else
printf("%s[%s] = %s\n", name, i, arr[i])
}
}