Export JSON to environment variables in BASH
Phil Hadviger
Principal Site Reliability Engineer @ GLGI need these key/value pairs from JSON exported to the environment
There have been a few times where I've needed to take the contents of a JSON object and export them to the environment. While there are surely lots of way to do this with awk
, sed
and/or jq
in combination, I've opted to just create a bash function for it.