title: variable in bash script not working as expected
body: <p>I have this script:</p>
  
  <pre><code>#!/bin/bash
  VAR="eric.sql"
  sudo mysqldump -c -u username -p1234 dbname &gt; $VAR
  </code></pre>
  
  <p>But if i run this script I get this error:</p>
  
  <pre><code>: Protocol error 3: mysql-export.sh: cannot create eric.sql
  </code></pre>
  
  <p>But if I don't use the variable, but just this:</p>
  
  <pre><code>#!/bin/bash
  VAR="eric.sql"
  sudo mysqldump -c -u username -p1234 dbname &gt; eric.sql
  </code></pre>
  
  <p>... it is working well. What do I wrong?</p>