Read from stdin
Read lines from stdin and print in on stdout. Terminate the program when “exit” is entered.
(more…)
Printf in groovy
This shows you how to use the printf function in groovy to print a tic tac toe field like this:
| x | o ---+---+--- | x | ---+---+--- o | |
in stdout