title: Why doesn't ${@:-1} return the last element of $@?
body: <p><em>I thought to post up a Q&amp;A on this as I did not find anything similar. If it already exists, please mark this as a duplicate.</em></p>
  
  <hr>
  
  <p>The following code, running under Bash shell, doesn't work (should return just <code>f</code>, the last (-1-th) item in <code>$@</code>):</p>
  
  <pre><code>$ set -- a b c d e f
  $ echo ${@:-1}
  a b c d e f
  </code></pre>