ubuntu-buildroot/output/build/host-gawk-5.2.0/test/mdim3.awk

30 lines
505 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
BEGIN {
inp[0] = "blah"
inp[1] = "blah"
inp[2] = ""
inp[3] = "Summary Statistics"
inp[4] = "temperature,0"
inp[5] = "rain,1"
for (i = 1; i <= 40; i++) {
print "i =", i
mode = 0
nr = 0
delete val
for (j = 0; j < 6; j++) {
x = inp[j]
print "\tj =", j
# if (i == 27 && j == 3)
# stopme()
nf = split(x,f,",")
print "\tnf =", nf
if (++nr > 1) {
if (!nf)
mode = 1
else if (mode == 1)
val[f[1]] = f[2]
}
}
}
}