RosettaCodeData/Task/Take-notes-on-the-command-line/Nim/take-notes-on-the-command-line.nim
2016-12-05 23:44:36 +01:00

10 lines
244 B
Nim

import os, times, strutils
if paramCount() == 0:
try: stdout.write readFile("notes.txt")
except IOError: discard
else:
var f = open("notes.txt", fmAppend)
f.writeln getTime()
f.writeln "\t", commandLineParams().join(" ")
f.close()