← Back Home

Grep with Multi Pattern

  1. til

mostly we use grep to find single word/pattern. when we need to find multi patterns in single command, use -E options and use pipe as delimiter for patterns

example:

grep -E 'pattern1|pattern2'

comments powered by Disqus