Last active
September 25, 2017 13:40
-
-
Save grrywlsn/ba7b4e4471ae18bfe8a6ece1854f6622 to your computer and use it in GitHub Desktop.
jq to grab AWS instance hourly cost
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
curl --silent "http://www.ec2instances.info/instances.json" | jq '.[] | select(.instance_type=="r4.large").pricing["eu-west-1"].linux.ondemand' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Optionally
curl --silent "http://www.ec2instances.info/instances.json" | jq '.[] | select(.instance_type=="r4.large").pricing["eu-west-1"].linux.ondemand' | sed 's/"//g'
will remove the doublequotes