mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 12:57:01 +00:00
add grep
type of grep
This commit is contained in:
parent
5a9b0c3372
commit
89eb5d75f4
@ -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 New Issue
Block a user