mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
synced 2024-12-28 09:59:00 +01:00
added new 'grep' one-liners
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
8c8d6792d3
commit
cf1bd00f65
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -2899,6 +2899,16 @@ fgrep "pattern" * -R
|
||||||
grep . filename > newfilename
|
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
|
###### Except multiple patterns
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in a new issue