Place Holder Products Code
Bash MySQL
Notes Return of the Fed Login
Admin Control Panel Email Control Panel Product Control Panel Debug Info Beacon Create Snippet Tag Control Panel

Get IPs with Regex

Use grep to extract IPs using a regular expression.

Here, we extract from the auth log by reading it and piping to grep:

cat /var/log/auth.log | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"

-E for extended regex, -o for show just the matched part


No Comments Yet!