From cf1bd00f650469235d6069b0f15c16c637ed9d2e Mon Sep 17 00:00:00 2001 From: trimstray Date: Sun, 10 Mar 2019 23:34:38 +0100 Subject: [PATCH] added new 'grep' one-liners - signed-off-by: trimstray --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 1206469..2060672 100644 --- a/README.md +++ b/README.md @@ -2899,6 +2899,16 @@ fgrep "pattern" * -R grep . filename > newfilename ``` +###### Show only for multiple patterns + +```bash +grep 'INFO*'\''WARN' filename +grep 'INFO\|WARN' filename +grep -e INFO -e WARN filename +grep -E '(INFO|WARN)' filename +egrep "INFO|WARN" filename +``` + ###### Except multiple patterns ```bash