Search Results

Search: Posts Made By: KatieV
4,357
Posted By kurumi
#!/usr/bin/env ruby require 'ipaddr' def...
#!/usr/bin/env ruby

require 'ipaddr'
def dec2ip(dec) return IPAddr.new(dec, Socket::AF_INET).to_s end
def ip2dec(ip) return IPAddr.new(ip).to_i end
file=ARGV[0]
insertline=ARGV[1]...
4,357
Posted By durden_tyler
I've cooked up a quick Perl script for this...
I've cooked up a quick Perl script for this problem. Given a line that has an IP address, the script loops through the file, compares the IP addresses and plugs the input line wherever appropriate.
...
4,357
Posted By quirkasaurus
vi '+/192\.189\.1\.2' log_file << EOF ...
vi '+/192\.189\.1\.2' log_file << EOF
o$fwInsert^[:wq
EOF



where the ^[ is the ESC character, entered by typing CONTROL-V ESCAPE in vi insert mode.

Also. It may be tricky to add the...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 05:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy