The condition involves the test statement seen above, where one value is compared with another. If the comparison is true, the commands within the loop are executed. If not, they are not executed.
Using another form of the above example,
#!/bin/sh
while test $# -gt 0; do
echo parameter $1
shift
done
exit 0
Note that the while and do are on the same line, and that in this case they must be separated by a semicolon. The semicolon is a command separator.