RosettaCodeData/Task/Take-notes-on-the-command-line/Factor/take-notes-on-the-command-line.factor
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

13 lines
333 B
Factor

#! /usr/bin/env factor
USING: kernel calendar calendar.format io io.encodings.utf8 io.files
sequences command-line namespaces ;
command-line get [
"notes.txt" utf8 file-contents print
] [
" " join "\t" prepend
"notes.txt" utf8 [
now timestamp>ymdhms print
print flush
] with-file-appender
] if-empty