The set command in the following loop is confusing to me.
for i in "$@"
do
set -- "$@" "$i" # what does it mean?
done
I can understand $@ is all the positional parameters, and $i is one of the positional parameters. However, I can't figure out what
set -- "$@" "$i"
means.