mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2025-02-16 21:18:23 +00:00
add grep
This commit is contained in:
parent
1441c484a4
commit
12370acf8a
1 changed files with 7 additions and 1 deletions
|
@ -34,7 +34,13 @@ grep -o -P '(?<=w1).*(?=w2)'
|
|||
#####grep lines without word (e.g. bbo)
|
||||
|
||||
```bash
|
||||
grep -v bbo
|
||||
grep -v bbo filename
|
||||
```
|
||||
|
||||
#####grep only one/first match (e.g. bbo)
|
||||
|
||||
```bash
|
||||
grep -m 1 bbo filename
|
||||
```
|
||||
|
||||
#####grep and count (e.g. bbo)
|
||||
|
|
Loading…
Add table
Reference in a new issue