for (( i = 1; i <= 9; i++ )) ### Outer for loop ###
do
for (( j = 1 ; j <= 9; j++ )) ### Inner for loop ###
do
tot=`expr $i + $j`
tmp=`expr $tot % 2`
if [ $tmp -eq 0 ]; then
echo -e -n "\033[47m "
else
echo -e -n "\033[40m "
fi
done
echo -e -n "\033[40m" #### set back background colour to black
echo "" #### print the new line ###
done
output :~
It was very nice article and it is very useful to Linux learners.We also provide Linux online training
ReplyDeleteIt would be interesting if we can make the chessboard move on the screen
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteCASINO BETTING - 946 Central Ave, Las Vegas, NV 89109
ReplyDeleteCASINO BETTING at 946 Central Ave in Las Vegas, 속초 출장샵 NV 89109. (702) 770-5580. Contact. Hours, Mon - Thu 9am - 9pm. 충청북도 출장안마 Contact details. 김해 출장샵 Hours. 남양주 출장마사지 Mon - 화성 출장마사지 Thu 11am - 3pm. Call (702) 770-7555.