title: insert bash-variables in psql-command
body: <p>I'm going crazy while trying to insert bash-variables in a psql commands as connection paramters as well as variables in the command itself. The following example works properly:</p>
  
  <pre><code>psql -U postgres -h localhost -p 5432 -c "CREATE DATABASE  testdb WITH ENCODING='UTF8' OWNER=postgres TABLESPACE=pg_default TEMPLATE=template_postgis CONNECTION LIMIT=-1;"
  </code></pre>
  
  <p>Now I'm trying to exchange each parameter through a variable, which is held in special config-file.</p>
  
  <p>Non-working example:</p>
  
  <pre><code>dbserver=localhost
  dbport=5432
  dbowner=postgres
  dbname=testdb
  dbtemplate=template_postgis
  dbtablespace=pg_default
  
   psql -U '$dbowner' -h '$dbserver' -p '$dbport' -c "CREATE DATABASE  '$dbname' WITH ENCODING='UTF8' OWNER='§dbowner' TABLESPACE='$dbtablespace' TEMPLATE='$dbtemplate'
  CONNECTION LIMIT=-1;"
  </code></pre>
  
  <p>I've tried several quotings, backquotes and escape-slashes already but smhow it still won't work.
  Thanks in advance, knutella</p>