Place Holder Projects Code
Bash MySQL JavaScript MySQL Quick Reference
Notes Documents Return of the Fed Login

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