grep Hacks

When searching for IPs use ‘grep -w‘ to get the exact IP match only; otherwise grepping ‘’ will also give you, etc.

When exctracting strings with grep use ‘grep -o‘ option to get ONLY the matching pattern, not the rest of the line.

Use ‘grep -c‘ to get match count in each file.


Comments are closed.

%d bloggers like this: