Last updated 1 year ago
Was this helpful?
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 } }
$ sidef notes.sf Test 1 $ sidef notes.sf Test 2 $ sidef notes.sf Sat Sep 12 00:19:36 2015 Test 1 Sat Sep 12 00:19:37 2015 Test 2