bash interprets the line by putting in the variable values first so;
Code:
for param in $1 $2
where $1=one and $2 is blank the line looks like;
Code:
for param in one
this also demonstrates why quoting variables is important, consider where $1="one two" and $2="three four" the line would be interpreted as;
Code:
for param in one two three four
which would actually loop four times. Using quotes;
Code:
for param in "$1" "$2"
where $1 and $2 are as in the previous example, gets interpreted to
Code:
for param in "one two" "three four"
and would only be looped twice, with param="one two" and then "three four"