2012年1月11日 星期三

Linux grep command for multiple pattern example

Search multiple pattern in files.
command: grep -e PATTERN1 -e PATTERN2 -e PATTERN3 your-source-file

You can have a file to keep your pattern and filter by it.
command: grep -f pattern-file your-source-file

沒有留言:

張貼留言