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

14 lines
270 B
Text

#!/usr/bin/ijconsole
require 'files strings'
notes=: monad define
if. #y do.
now=. LF ,~ 6!:0 'hh:mm:ss DD/MM/YYYY'
'notes.txt' fappend~ now, LF ,~ TAB, ' ' joinstring y
elseif. -. _1 -: txt=. fread 'notes.txt' do.
smoutput txt
end.
)
notes 2}.ARGV
exit 0