Simple Bash DNS-Query Script for several hosts

in #bash5 years ago

This is one simple script to parse a list of fqdn-hostnames if you need only the ip-addresses.
You can customize it in any way you want just like extending for ping-requests or generating new lists from it.

while read line; do host $line |  awk '{print $NF}' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"; done < list.txt

Hope you like this short example.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 66038.35
ETH 3444.84
USDT 1.00
SBD 2.61