in reply to one liner with separate input file?
perl -pi -e 'BEGIN{ local @ARGV = ("IP_addr.txt"); %IP = map {$_ => 1; +} <>; } $_ = "#" . $_ if /((\d{1,3}\.){3}(\d{1,3}))/ and exists $IP{$1} +;'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: one liner with separate input file?
by MrGibbs (Initiate) on Apr 15, 2015 at 20:01 UTC | |
by Laurent_R (Canon) on Apr 15, 2015 at 20:53 UTC | |
by MrGibbs (Initiate) on Apr 17, 2015 at 21:13 UTC | |
by ww (Archbishop) on Apr 17, 2015 at 21:30 UTC | |
by Laurent_R (Canon) on Apr 17, 2015 at 22:54 UTC |