title: bash command unexpected EOF while looking for matching
body: <p>I want to create a bash file where I connect to a docker container(mysql) and I run a query, and after I want to output the result in a csv file. What I've tried:</p>
  
  <pre><code> #!/bin/bash
  
   docker-compose exec db /bin/bash -c 'mysql -u user -ppassword dbname 
   -e "SELECT c.id, c.first_name, c.last_name, 
   c.email, cp.id, cp.name, company.id, company.name FROM 
   db.candidate c LEFT JOIN db.candidate_position cp ON 
   cp.id = c.candidate_position_id LEFT JOIN db.company company 
   ON company.id = c.company_id INTO OUTFILE \'Result.csv\'"'
  </code></pre>
  
  <p>The error is that I get:</p>
  
  <pre><code> line 3: unexpected EOF while looking for matching `"'
  </code></pre>