RosettaCodeData/Task/Take-notes-on-the-command-line/Sidef/take-notes-on-the-command-line.sidef
2017-09-25 22:28:19 +02:00

10 lines
202 B
Text

var file = %f'notes.txt'
if (ARGV.len > 0) {
var fh = file.open_a
fh.say(Time.local.ctime + "\n\t" + ARGV.join(" "))
fh.close
} else {
var fh = file.open_r
fh && fh.each { .say }
}