Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: