I'm having a hard time getting the value of an environment variable ($GHREPO) in a quoted string. Here is the command I'm running. I'm trying to make a directory with the value of j[ChgSub][$GHREPO][0][Major], $GHREPO being an environment variable. mkdir `cat ../dummy.json |  ruby -rjson -e 'j = JSON.parse($stdin.read); puts j[ChgSub][$GHREPO][0][Major].to_s'`Edit:dummy.json content{  ChgSub: {    ecx: [      {        Major: 0,        Minor: 0,        Patch: 3      }    ]  }}
How to parse env variable in a quoted string?
bash;shell;quoting