awk/testdir/t.incr2

9 lines
93 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
{ s = 0
for (i=1; i <= NF; )
if ($(i) ~ /^[0-9]+$/)
s += $(i++)
else
i++
print s
}