I have the following code snippet
for num do echo $num done
But I don't understand why it works! How come does Bash know to loop through my params $1, $2, $3, $... using my personal taste of "num" variable???
It's a feature of bash:
is a shorthand for
The documentation is at http://www.gnu.org/software/bash/manual/bashref.html#Looping-Constructs