10/24 What's an easy way to see if say column 3 of a file matches a list of
expressions in a file? Basically I want to combine "grep -f <file>"
to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
I can do this with "egrep -f " and use regexp instead of strings, but
was wondering if there was some magic way to do this.
\_ UNIX has no magic. Make a shell script to produce the ask or egrep
you're looking for and there's your wizardry right there.
\- re: magic: there are sometimes (relatively) obscure commands
which do something slightly more painful to do with lower
level tools, e.g. comm, jot, paste, join, tac, sort -M. I didnt
know about 'grep -L' until maybe 5yrs ago, and would figure
out how to do that in (relatively) painful ways. |