title: printing the command using environment variables in shell script not working
body: <p>I have a following requirement of running the azure cli commands in a bash script file, for which i have created two script files as below</p>
  <ol>
  <li><p>to set the environment  (environment.sh)</p>
  <pre><code>#!/bin/sh
  echo &quot;setting environment&quot;
  export az_resource_group=&quot;test-group&quot;
  echo &quot;resource group is $az_resource_group&quot;
  export az_source_server=&quot;test-server&quot;
  echo &quot;source_server is $az_source_server&quot;
  export az_recovery_server=&quot;test-recovery-server&quot;
  echo &quot;recovery-server is$az_recovery_server&quot;
  export az_restore_time=&quot;2020-07-27T12:52:21.000Z&quot;
  echo &quot;restore point in time is $az_restore_time&quot;
  </code></pre>
  </li>
  <li><p>the actual script file to run azure cli commands (azurecommands.sh)</p>
  <pre><code>#!/bin/sh
  resource_group=$az_resource_group
  recovery_server=$az_recovery_server
  source_server=$az_source_server
  restore_time=$az_restore_time
  echo &quot;restoring postgresql database&quot;
  echo &quot;az postgres server restore -g $resource_group --restore-point-in-time $restore_time  -s $source_server -n $recovery_server&quot; 
  </code></pre>
  </li>
  </ol>
  <p>the above az command works properly when run individually or using arguments in bash, but if i use <strong>environment variables</strong> the command itself does not form correctly. so i decided to print it so that i can verify what is command that is being formed.</p>
  <p>To my surprise the output is <code>-n test-recovery-server 2020-07-27T12:52:21.000Z</code>
  while my expected output is <code>az postgres server restore -g test-group --restore-point-in-time -s test-server -n test-recovery-server </code>.</p>
  <p>I'm also making sure to run environment.sh file as follows:</p>
  <pre><code>source environment.sh
  </code></pre>
  <p><strong>How can echo not print the correct command?</strong> is there something with the way i use environmental variables? if so please suggest me some other approach, because these commands need to be automated.</p>