Created
August 11, 2015 07:31
-
-
Save aalbertson/51e7719d76979c4bdd22 to your computer and use it in GitHub Desktop.
Revisions
-
aalbertson created this gist
Aug 11, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ # Simple for loop leveraging both filters and query params off the default "Name" tag: for i in $(aws ec2 describe-instances --region us-west-2 --filters "Name=tag:Name,Values={replace-with-name-tag-value}" --query "Reservations[].Instances[].PrivateIpAddress[]" --output text); do echo -e "ip: $i"; done