RosettaCodeData/Task/Take-notes-on-the-command-line/Nim/take-notes-on-the-command-line.nim
2023-07-01 13:44:08 -04:00

10 lines
248 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.writeLine getTime()
f.writeLine "\t", commandLineParams().join(" ")
f.close()