To get a pattern of chessboard
Hi friends,
For getting a pattern of chessboard
But due to some reasons..I am not getting the desired output.Can u help me with this..
for (( i=1; i <= 9; i++ ))
do
for (( j=1; j <= 9; j++ ))
do
tot=`expr $i + $j`
tmp=`expr $tot % 2`
if [ $tmp -eq 0 ]/* if even puts white color */
then
echo -e -n "\033[40m"
else
echo -e -n "\033[47m"
fi
done
echo -e -n "\033[40m"
echo " "
done
Last edited by som_kurian; 11-23-2007 at 03:35 AM.
|