title: sqlite3 can not open database file when path is given by an environment variable
body: <p>I have a SQLite database from which I need to dump a few tables. I created a small script:</p>
  
  <pre><code>$ cat dump.cmd
  .output ./layers.sql
  .dump layers
  .output ./attributes.sql
  .dump attributes
  .exit
  </code></pre>
  
  <p>The database file is owned by the user and accessible to <code>sqlite3</code>:</p>
  
  <pre><code>$ ls -laht /home/user/temp/sqlite.db
  -rw-r--r--+ 1 user super-users 2,7G 25 jul 10:52 /home/user/temp/sqlite.db
  
  $ sqlite3 /home/user/temp/sqlite.db
  SQLite version 3.7.17 2013-05-20 00:56:22
  Enter ".help" for instructions
  Enter SQL statements terminated with a ";"
  sqlite&gt; 
  </code></pre>
  
  <p>The exact location of the database is only known at run time, so the path must be read from an environment variable. This is where things are going wrong:</p>
  
  <pre><code>$ DB_PATH=/home/user/temp/sqlite.db
  $ sqlite3 $DB_PATH &lt; dump.cmd
  Error: unable to open database "/home/user/temp/sqlite.db": unable to open database file
  </code></pre>
  
  <p>I tried in a different way with <code>eval</code> but there is the same error:</p>
  
  <pre><code>$ CMD="sqlite3 "$DB_PATH" &lt; dump.cmd"
  $ eval `$CMD`
  Error: unable to open database "/home/user/temp/sqlite.db": unable to open database file
  </code></pre>
  
  <p>How can <code>sqlite3</code> be started with a path from an environment variable?</p>