Tim Chase on Nostr: I often find myself consecutively filtering with multiple chained greps $ grep a ...
I often find myself consecutively filtering with multiple chained greps
$ grep a in.txt | grep b | grep -v c | grep d
and found it was often easier, cleaner, and faster to do in a single awk expression
$ awk '/a/ && /b/ && !/c/ && /d/' in.txt
Just in case someone else finds it useful.
$ grep a in.txt | grep b | grep -v c | grep d
and found it was often easier, cleaner, and faster to do in a single awk expression
$ awk '/a/ && /b/ && !/c/ && /d/' in.txt
Just in case someone else finds it useful.