Last active
September 25, 2020 18:37
-
-
Save lewayotte/1b9fb8c4d32337e20441ff7df1e5c904 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
/usr/local/bin/aws ec2 describe-tags --filters "Name=resource-id,Values=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`" "Name=key,Values=domain" | grep Value | tr -d ' ' | cut -f2 -d: | tr -d '"' | tr -d ',' | |
#/usr/local/bin/aws ec2 describe-tags --filters "Name=resource-id,Values=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`" | grep -b1 domain | grep Value | tr -d ' ' | cut -f2 -d: | tr -d '"' | tr -d ',' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment