title: Inline variable in shell script
body: <p>In one of my requirement, I like to create command at start of script and like to fill those variable later. For example:</p>
  
  <pre><code># Global
  Mylistdir="ls -la $MYDAIR"
  
  #now after some code  I want to create this variable
  MYDAIR="/data/dir/"
  #Now like to run taht command on /data/dir
  echo "$Mylistdir"
  </code></pre>
  
  <p>How can I do it?</p>
  
  <p>I tried it as </p>
  
  <pre><code>Mylistdir="ls -la `$MYDAIR`"`
  </code></pre>
  
  <p>but didn't work.</p>