#!/bin/bash
I=0
while [ $I -lt 10 ]; do
printf "\e[1;3%dm%3d\e[0m" `expr $I % 8` $I
I=`expr $I + 1`
done
echo ""
echo "------------------------------------"
I=0
while ((I < 10)); do
printf "\e[1;3%dm%3d\e[0m" $(($I % 8)) $I
((I++))
done
echo ""
Résultats de test
#!/bin/sh
#
#i=0
#while [ $i -lt 5 ]
#do
# echo $i
# i=`expr $i + 1`
#done
i=0
while ((i < 5))
do
echo $i
((i ++))
done
echo $((300 + 100))
if ((100 > 100))
then
echo ok
else
echo error
fi