ip

#!/bin/sh
cat /tmp/ipnosource.txt | while read LINE
do
   echo $LINE
    whois3 -h whois.apnic.net $LINE
done > /tmp/mm2
cat /tmp/mm2 |awk /%/,/status:/ >/tmp/mm3
cat /tmp/mm3 |awk /inetnum:/ |awk '{print $2,$4}' > /tmp/mm7
cat /tmp/mm3 | awk /netname:/ |awk '{print $2}' > /tmp/mm4
cat /tmp/mm3 | awk /mnt-by:/ | awk '{print $2}'> /tmp/mm5
cat /tmp/mm3 | awk /country:/ | awk '{print $2}'> /tmp/mm6
paste /tmp/ipnosource.txt /tmp/mm4 /tmp/mm5 /tmp/mm6 >/tmp/ss3
exit 0;
 

你可能感兴趣的:(ip)