Created
December 2, 2017 21:18
-
-
Save bmmalone/11b958c70ce166169ad41a32d5eac771 to your computer and use it in GitHub Desktop.
Convert a list of hostnames to IP addresses
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
#! /usr/bin/env bash | |
while read p; do | |
getent hosts $p | cut -d' ' -f 1 | |
done <$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment