mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2024-11-22 20:54:19 +00:00
add grep
type of grep
This commit is contained in:
parent
5a9b0c3372
commit
89eb5d75f4
1 changed files with 9 additions and 0 deletions
|
@ -94,6 +94,15 @@ or
|
|||
## Grep
|
||||
[[back to top](#handy-bash-oneliner-commands)]
|
||||
|
||||
##### Type of grep
|
||||
```bash
|
||||
grep = grep -G # Basic Regular Expression (BRE)
|
||||
fgrep = grep -F # fixed text
|
||||
egrep = grep -E # Extended Regular Expression (ERE)
|
||||
pgrep = grep -P # Perl Compatible Regular Expressions (PCRE)
|
||||
rgrep = grep -r # recursive
|
||||
```
|
||||
|
||||
##### Grep only IP address
|
||||
```bash
|
||||
grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
|
||||
|
|
Loading…
Reference in a new issue