Home > text parsing > Extract lines with different expressions from text files

Extract lines with different expressions from text files


Here is the Linux command to extract lines that contain more than one expression

The example below will only extract lines that contain “Source:” and “CustomEvent:”  in file MyLogFile.log

egrep "Source:|CustomEvent:" MyLogFile.log


Categories: text parsing Tags:
  1. No comments yet.
  1. No trackbacks yet.

*
= 4 + 3