title: Variable not storing values over ssh
body: <p>I need to run some commands over ssh to a remote machine.
  But while trying to execute some basic commands such as:</p>
  
  <pre><code>ssh abc@remotemachine.com "a='hello'; echo $a"
  </code></pre>
  
  <p>produces no output on the screen.
  However</p>
  
  <pre><code>ssh abc@remotemachine.com "echo 'hello'"
  </code></pre>
  
  <p>is working fine with the output</p>
  
  <pre><code>Hello
  </code></pre>
  
  <p>can anyone explain me why this is happening ?</p>
  
  <p>Also now the major issue is that I need to execute awk/cut onto the remote machines and store there outputs in a variable.
  Something like :</p>
  
  <pre><code>ssh abc@remotemachine.com 'a=$(df /tmp | awk 'NR==2 {print $NF}');echo $a' 
  </code></pre>
  
  <p>But I am unable to place <strong>'</strong> inside <strong>'</strong> <strong>'</strong> .</p>