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}'
Written by Chris Seymour
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best #Shell Authors
Sponsored by #native_company# — Learn More
#native_title# #native_desc#