title: single quote escaping in bash within single quoted string
body: <p><strong>The problem</strong></p>
  
  <p>I'm trying to create a kickstart file automatically, and the tool i'm using to parse it requires the kickstart to be supplied as a string in single quotes.</p>
  
  <p>Most of it is fine, except the postinstall script which uses awk, hence single quotes within single quotes.</p>
  
  <p>I've looked at some of the other posts, and tried escaping the strings, to no avail.</p>
  
  <p>I've clearly mis-understood some fundamental principal of escaping.</p>
  
  <p><strong>The code</strong> </p>
  
  <pre><code>DATA='
  GATEWAY=$(localcli network ip route ipv4 list | grep default | awk \'{print $3}\')
  '
  echo ${DATA}
  </code></pre>
  
  <p><strong>The desired output</strong></p>
  
  <p>This is the literal output string i'd like to see.</p>
  
  <pre><code>GATEWAY=$(localcli network ip route ipv4 list | grep default | awk '{print $3}')
  </code></pre>
  
  <p>Any help would be much appreciated!</p>
  
  <p>Thanks</p>
  
  <p>Matt</p>