2 ms·
It's awkward to embed Python in a pipeline and the awk can be quicker to write if the problem suits its domain. Execution speed may be slower than Python, depen
by ralph 14y ago
It's awkward to embed Python in a pipeline and the awk can be quicker to write if the problem suits its domain. Execution speed may be slower than Python, depends on the work needed and the awk used; gawk, mawk, Kernighan's One True awk, ...
awk 'NR > 3 && !/foo/ {s += $(NF - 2)} END {print NR, s + 0}'