Skip to content

Instantly share code, notes, and snippets.

View danielmacuare's full-sized avatar

Daniel Macuare danielmacuare

View GitHub Profile
@danielmacuare
danielmacuare / hosts_cmd.sh
Last active December 14, 2019 17:57
Bash script to resolve names or IPs
#!/bin/bash
# Function that will expect a list of arguments from the cli and will resolve them using the host command.
# It will return the dns records or Ips on stdout
# Example bash hosts_cmd.sh 10.176.148.12 10.176.148.193 10.176.152.63 10.176.152.64 10.176.152.65 10.176.152.66 10.176.152.67 10.176.152.68 10.176.152.69 10.176.152.70 10.176.152.71 10.176.152.72
#USAGE
# bash hosts_cmd.sh 10.195.129.22 10.195.129.23 10.185.129.62 10.185.129.63
light_green_bold="\033[1;92;49m"