#!/bin/bash
largo=`wc -l ip|awk '{print $1}'`
echo "Direccion IP | Dueno">salida.txt
echo "--------------------------------">>salida.txt
for ((i=1;i<=largo;i++))
do
ip=$(sed -n ""$i"p" ip|awk '{print $1}')
owner=`whois $ip|grep owner:`
dueno=${owner#*owner:}
echo "$ip | $dueno" >> salida.txt
done
more salida.txt
No comments:
Post a Comment