-o, --only-matching
Print only the matched (non-empty) parts of lines, one to a line.
An option of grepx.
Usage
grepx -o PATTERNS [FILE]...
grepx --only-matching PATTERNS [FILE]...Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-o | --only-matching | none | print only the matched (non-empty) parts of lines, one to a line |
Examples
Print only the matched parts, here every IPv4-looking address
grepx -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' access.logHelp in the terminal
gnux help grepx --only-matching