title: What's the use of `!#` in bash?
body: <p>I'm not talking about the UNIX <a href="https://stackoverflow.com/questions/10376206/what-is-the-preferred-bash-shebang">shebang</a> meant to give the path of an interpreter. In fact, the shebang has made it quite hard to google this question successfully...</p>
  
  <p>I'm talking about <code>bash</code> expansion:</p>
  
  <ul>
  <li><code>!!</code> retrieves the immediately preceding command (akin to the up arrow, but more usable)</li>
  <li><code>!$</code> retrieves the last word of the last command</li>
  <li><code>!#</code> appears to retrieve the current line</li>
  </ul>
  
  <p>But <strong>what're actually useful uses of <code>!#</code>?</strong></p>
  
  <ul>
  <li><code>echo !#</code> expands to <code>echo echo</code></li>
  <li><code>echo echo !#</code> expands to <code>echo echo echo echo</code></li>
  <li><code>ls !#</code> expands to <code>ls ls</code>.</li>
  </ul>
  
  <p>All of which seem overwhelmingly pointless. All I know about the <code>!#</code> command is what I've learned from using it – I'm not certain that I know its true functionality.</p>