title: Outputting an AWK variable for database INSERT, escaping single quote and backslash
body: <p>So I am running through a directory deriving names to insert into a MySQL database.
  Some of the names have a single quote ('). I'm using awk</p>
  
  <pre><code>ls *| awk -F=: '{print "INSERT into citation_sources (source_name) VALUES (" "'\''" $1 "'\''" ");"}'
  </code></pre>
  
  <p>While I can get the output to appear properly from awk. 
  E.G.:</p>
  
  <pre><code>INSERT into citation_sources (source_name) VALUES ('Black's Law Dictionary, 2nd Edition (Black 1891));
  </code></pre>
  
  <p>When it's time to insert the data into MySQL I'd like to avoid having to do a second data edit to properly escape the single quote with <code>\'</code>.</p>
  
  <p>What am I missing in my awk to do this for me? </p>