Skip to content

Instantly share code, notes, and snippets.

@bmmalone
Created December 2, 2017 21:18
Show Gist options
  • Save bmmalone/11b958c70ce166169ad41a32d5eac771 to your computer and use it in GitHub Desktop.
Save bmmalone/11b958c70ce166169ad41a32d5eac771 to your computer and use it in GitHub Desktop.
Convert a list of hostnames to IP addresses
#! /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