--shell:
i=4; while [ $i != 0 ]; do
i=`expr $i - 1`
done
The let command is a replacement for the old method of performing shell arithmetic using the expr command.
# Note: != syntax is easier to remember and less error-prone than -le. Now, If you must count from 1 upward,
i=1; while [ $i -le 4 ]; do
i=`expr $i + 1`
done