title: How do I escape a series of backslashes in a bash printf?
body: <p>The following script yielded an unexpected output:</p>
  
  <pre><code>printf "escaped slash: \\ \n"
  printf "2 escaped slashes: \\\\ \n"
  printf "3 escaped slashes: \\\\\\ \n"
  printf "4 escaped slashes: \\\\\\\\ \n"
  </code></pre>
  
  <p>Run as a bash script under Ubuntu 14, I see:</p>
  
  <pre><code>escaped slash: \
  2 escaped slashes: \ 
  3 escaped slashes: \\ 
  4 escaped slashes: \\
  </code></pre>
  
  <p>Err.. <em>what?</em></p>