-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchess.sh
More file actions
33 lines (33 loc) · 703 Bytes
/
chess.sh
File metadata and controls
33 lines (33 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
#*****************************************************
#Author: huwei
#QQ: 115185849
#Date: 2020-05-04
#FileName: chess.sh
#Description: print the chess pane
#URL: http://nanyuzuo.xin/hexo
#Copyright (c):2020 All rights reserved
#****************************************************
for((i=1;i<=8;i++));do
if [ $((i%2)) -eq 0 ];then
for((j=1;j<=8;j++));do
if [ $((j%2)) -eq 0 ];then
echo -e "\033[41m \033[0m\c"
else
echo -e "\033[43m \033[0m\c"
fi
done
echo
else
for((k=1;k<=8;k++));do
if [ $((k%2)) -eq 1 ];then
echo -e "\033[41m \033[0m\c"
else
echo -e "\033[43m \033[0m\c"
fi
done
echo
fi
done
echo