Created
November 29, 2018 04:38
-
-
Save moinsam/3a6a079aa16b664809e6bd54df25e75e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -a ipAddress | |
x=0 | |
for((i = 10; i <= 20; i++)) { | |
ipAddress[$x]="hostname-${i}.end.local" | |
((x=x+1)) | |
} | |
for ip in "${ipAddress[@]}"; do | |
printf "$ip %s\\n" $(dig +short "$ip") | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment