4 ms·
And you can of course put the whole chessboard in a string ... blackwhite=$(tput rev; echo -n " "; tput sgr0; echo -n " ") whiteblack=$(tput sgr0; echo -
by emmelaich 6y ago
And you can of course put the whole chessboard in a string ...
blackwhite=$(tput rev; echo -n " "; tput sgr0; echo -n " ")
whiteblack=$(tput sgr0; echo -n " "; tput rev; echo -n " ")
row_odd=$(for col in {1..4}; do echo -n "$whiteblack"; done; echo)
row_even=$(for col in {1..4}; do echo -n "$blackwhite"; done; echo)
chessboard=$(for i in {1..4}; do echo "$row_odd"; echo "$row_even"; done;tput sgr0)