Skip to content

Instantly share code, notes, and snippets.

@flrichar
Created March 13, 2018 18:26
Show Gist options
  • Select an option

  • Save flrichar/75b0e29862efedeaa08e07ca5b539dd3 to your computer and use it in GitHub Desktop.

Select an option

Save flrichar/75b0e29862efedeaa08e07ca5b539dd3 to your computer and use it in GitHub Desktop.
parse v4 ip with perl
#!/usr/bin/perl
## extracts all ips from log file
while (<>) {
chomp;
if (/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) {
print "$&\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment