title: What does triple-single-quote mean in bash?
body: <p>I have seen lots of uses of single and double-quotes in bash, as well as backtick-quotes, but have never seen what follows. What is the meaning of the transcript below, which seems to show that triple-single-quoting is recognized as meaningful by bash and further seems to show that single quotes inside this thing also have special meaning, enabling interpolation? I have found no documentation of this.</p>
  
  <pre><code>$ Q=test
  $ echo '$Q'                      # &lt;== I know, this doesn't work...
  $Q                               # &lt;== ...and so it doesn't. 
  $ echo '''$Q'''                  # &lt;== Don't know what this could mean.
  $Q                               # &lt;== OK, nothing special?
  $ echo ''' "$Q" '''              # &lt;== Try a double-quote??
   "$Q"                            # &lt;== Hmm... OK, nothing.
  $ echo ''' '$Q' '''              # &lt;== Try a single-quote?
   test                            # &lt;== Wow, it did interpolate!?
  $ echo '''                         
  &gt; '''                            # &lt;== Continuation! Proving bash  
                                   #     thinks this is an opening 
                                   #     quote of some kind.
  $ bash --version                 # &lt;== FYI,  version info
  GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
  Copyright (C) 2007 Free Software Foundation, Inc.
  </code></pre>