Tuesday, August 3, 2010

Grep: get patterns from a file

Having a list of patterns in patternsfile and needed to search for those patterns in datafile use:


$ grep -f patternsfile datafile

No comments:

Post a Comment