Created
November 22, 2019 03:55
-
-
Save KyMidd/d29efe21f095c8bb7d9e734423dfc64c to your computer and use it in GitHub Desktop.
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
# Write dynamic | |
input="CIDRlist" | |
while IFS= read -r read | |
do | |
subnet=$(echo "${read%%/*}") | |
netmask=$(ipcalc -m "$read") | |
netmask=$(echo "${netmask#*=}") | |
echo " - network-object $subnet $netmask" >> AWS2ASAPlaybook | |
done < "$input" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment