title: How can I interpret variables on the fly in the shell script?
body: <p>I'm reading JSON in a shell script using JQ. Here, I'm unable to interpret the variables $HOME, $HOST, $PEMFILE in my shell script on the fly.</p>
  
  <p>JSON File:</p>
  
  <pre><code>{
      "script": {
      "install": "${HOME}/lib/install.sh $HOST $PEMFILE",
      "Setup": "${HOME}/lib/setup.sh $HOST $PEMFILE $VAR1 $VAR2"
      }
  
  }
  </code></pre>
  
  <p>Shell Script:</p>
  
  <pre><code>#!/bin/bash
  examplefile="../lib/example.json"
  HOST=ec2-..-...-...-...us-west-2.compute.amazonaws.com
  PEMFILE=${HOME}/test.pem
  
  installScript=($(jq '.script.install' $examplefile))
  bash "$installScript"
  </code></pre>
  
  <p>Is there a way I can interpret these variables on the fly without modifying the JSON?</p>
  
  <p>P.S I don't want to use eval.</p>