Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
Created July 9, 2021 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabh-hirani/9ac5bc59a098e5f4858f2574cd4c4077 to your computer and use it in GitHub Desktop.
Save saurabh-hirani/9ac5bc59a098e5f4858f2574cd4c4077 to your computer and use it in GitHub Desktop.
test.sh
aws ec2 describe-instances | jq -rc '.Reservations[].Instances[] |
[.InstanceId, (.PublicIpAddress | if .==null then "Private" else "Public" end)] | @csv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment