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

22 lines
417 B
Text

#!/usr/bin/lasso9
local(
arguments = $argv -> asarray,
notesfile = file('notes.txt')
)
#arguments -> removefirst
if(#arguments -> size) => {
#notesfile -> openappend
#notesfile -> dowithclose => {
#notesfile -> writestring(date -> format(`YYYY-MM-dd HH:mm:SS`) + '\n')
#notesfile -> writestring('\t' + #arguments -> join(', ') + '\n')
}
else
#notesfile -> exists ? stdout(#notesfile -> readstring)
}