Last Updated: February 25, 2016
·
903
· iiseymour

grep XOR awk

Far to often in scripts you will see the following:

grep 'foo' | awk '{print $2}'

Use regexp constants to filter with awk and save a subprocess:

awk '/foo/{print $2}'