title: difference between $@ and $* in bash script
body: <p>There are 4 bash snippets below. I call them with <code>./script.sh a b c</code></p>
  
  <pre><code>for arg in $@; do 
  echo "$arg"
  done   ## output "a\nb\nc"
  
  for arg in "$@"; do
  echo "$arg"
  done  ## output "a\nb\nc" -- I don't know why
  
  for arg in $*; do
  echo "$arg"
  done  ##    output "a\nb\nc"
  
  for arg in "$*"; do
  echo "$arg"
  done    ## output "abc"
  </code></pre>
  
  <p>I don't know what is the exact difference between <code>$@</code> and <code>$*</code>,<br>
  and I think <code>"$@"</code> and <code>"$*"</code> should be the same, but they are not. Why?</p>