title: Store last command in a variable in Bash
body: <p>I'm want to store the most recent command in a variable. I tried the <code>!!:p</code> history expansion, it does get me the last command but I can't store it in a variable.</p>
  <pre><code>$ last=`!!:p`
  last=`ls`
  $ echo $last
  
  $
  </code></pre>
  <p>Any help?</p>