@ccstone Yep, I was suggesting four separate actions.
I agree that the regex can be incorporated into the awk
command most of the time, but since the built-in awk
has a less powerful RE engine than pcregrep
, it took me more work to set up the RE in awk if I needed a lot of escape characters. By splitting into grep+awk, I can use grep
or pcregrep
first depending on the data. YMMV