RosettaCodeData/Task/Take-notes-on-the-command-line/Groovy/take-notes-on-the-command-line.groovy
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

6 lines
162 B
Groovy

def notes = new File('./notes.txt')
if (args) {
notes << "${new Date().format('YYYY-MM-dd HH:mm:ss')}\t${args.join(' ')}\n"
} else {
println notes.text
}