Script Linux: Transforma o lista de ip-uri in hostname-uri

Aveti aici un script bash care transforma o lista de ip-uri in reverse ip, adica in hostname-uri:

for i in `cat ip.txt`
do
nslookup $i |grep name |awk '{print $NF}' |sed 's/.$//' >> hosts.txt
done
Silviu Stroe
I'm Silviu and I run Brainic, a mobile-focused software agency. I'm also a member of Nokia and Yahoo wall of fame. My interests are in low-code/no-code development and bleeding-edge technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *