Loop
For
#!/bin/bash

for i in 1 2 3 4 5 6
do
	echo -n $i # not change to a new line
done
echo

for i in {0..10}
do
	echo -n "$i "
done
echo

for i in {a..d}
do
	echo -n "$i "
done
echo

for (( i = 0; i < 10; i++ ))
do
	echo -n "$i "
done
echo
			
While
#!/bin/bash

a=0

while [ $a -lt 10 ]
do
	echo -n "$a "
	a=`expr $a + 1`
done
echo

while [ $a -gt 0 ]
do
	echo -n "$a "
	let a--
done
echo
			
Reference