github.com/benhoyt/goawk@v1.8.1/testdata/T.delete (about) 1 echo T.delete: misc tests of array deletion 2 3 awk=${awk-../a.out} 4 5 echo '1 2 3 4 6 1 2 3 7 1 8 ' >foo0 9 echo '4 3 0 10 3 2 0 11 1 0 0 12 0 0 0' >foo2 13 $awk ' 14 { n = split($0, x) 15 delete x[1] 16 n1 = 0; for (i in x) n1++ 17 delete x; 18 n2 = 0; for (i in x) n2++ 19 print n, n1, n2 20 }' foo0 >foo1 21 diff foo1 foo2 || echo 'BAD: T.delete (1)'