Pick an IP address out of any file

[code lang=”perl”]perl -ne ‘while (/([0-9]+\.){3}[0-9]+/g) {print “$&\n”};’ file.txt[/code]

from command-line-fu

Leave a Reply