title: sqlite3 shell command : database file not found, but path exists :
body: <p>The problem is simple:</p>
  
  <p>echo ".tables" | sqlite3 $myPathVariable</p>
  
  <p>If I do: <code>PATH=/my_path</code>  it works but i I do <code>myPathVariable="my_path"</code> it fails.
  The path is retrieved after getting the result of a grep+sed command like myPathVariable=`... grep ... sed`</p>
  
  <p>I need to retrieve dynamically the myPathVariable at execution time, can you please help me to achieve that, I must be missing something basic!</p>
  
  <p>By the way: <code>echo ".tables" | sqlite3 my_path</code> works but
  <code>echo ".tables" | sqlite3 "my_path"</code></p>
  
  <p>Edit: the variable PATH was just a bad name here, it doesn t refer to the PATH env variable, sorry :) .
  Then I noticed that the problem lies within sqlite3: 
  The command <code>.open ~/myDatabaseFilePath</code> fails.
  The command <code>.open "~/myDatabaseFilePath"</code> fails.
  The command <code>.open "/.../myDatabaseFilePath"</code> fails.
  But the command <code>.open /.../myDatabaseFilePath</code> works.
  So sqlite3 can't deal with path containing '~' or surrounded by quotes!</p>
  
  <p>The path generated at execution is correct, the file exists.
  It's just a workarround but it doesn't explain why it doesn't work!</p>
  
  <p>I'm just curious to know why the behaviour is not the same ?</p>
  
  <p>Thanks for your help!</p>