This file contains 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
#!/bin/bash | |
#Escape slash from name for folder name | |
folderName=$(echo $1| awk '{gsub("/","_")}1'); | |
mkdir $folderName && cd $folderName | |
fqdn=$1; | |
ipList=$(dig +short $fqdn|grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'); #Get all A names | |
if [ -z "$ipList" ] | |
then | |
ipArgument=$fqdn |