5
rated 0 times
[
5]
[
0]
/ answers: 1 / hits: 487
/ 2 Years ago, tue, july 19, 2022, 3:09:35
How can I create a shell script which receives a vector argument like
./script.sh google.com,yahoo.com
and display ip for each domain
like google.com 100.23.123.13
EDIT:
#!/bin/bash
while [ "$1" ];
do
host $1 | grep address | head -1
done
More From » scripts