Skip to content

Instantly share code, notes, and snippets.

@anilahir
Created May 14, 2019 06:57
Show Gist options
  • Select an option

  • Save anilahir/fb38147d1ec85f52eeadf8d59d84b337 to your computer and use it in GitHub Desktop.

Select an option

Save anilahir/fb38147d1ec85f52eeadf8d59d84b337 to your computer and use it in GitHub Desktop.
Ubuntu/Linux - Search and grep multiple words from multiple files
sed -rnE 's/(^\[[0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\])(.*)(abc is (online|offline))(.*)/\1 \3/p' lumen-2019-05-09.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment