RosettaCodeData/Task/Take-notes-on-the-command-line/Groovy/take-notes-on-the-command-line.groovy
2023-07-01 13:44:08 -04: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
}