Take notes on the command line: Difference between revisions

From Rosetta Code
Content added Content deleted
(New task)
 
m (ownership issue)
Line 1: Line 1:
{{task|Text processing}}{{selection|Axtens|Console Program Basics}}[[Category:Basic language learning]][[Category:Programming environment operations]]Take notes on command line
{{task|Text processing}}{{selection|Short Circuit|Console Program Basics}}[[Category:Basic language learning]][[Category:Programming environment operations]]Take notes on command line


NOTES.CMD is a commandline tool written in DOS Batch language. The task is to implement the same in your language.
NOTES.CMD is a commandline tool written in DOS Batch language. The task is to implement the same in your language.

Revision as of 14:58, 1 April 2010

Task
Take notes on the command line
You are encouraged to solve this task according to the task description, using any language you may know.
Take notes on the command line is part of Short Circuit's Console Program Basics selection.

Take notes on command line

NOTES.CMD is a commandline tool written in DOS Batch language. The task is to implement the same in your language.

Invoking NOTES without commandline arguments displays the current contents of the local NOTES.TXT if it exists. If NOTES has arguments, the current date and time are appended to the local NOTES.TXT followed by a newline. Then all the arguments, joined with a space, and prepended with a tab, are written to NOTES.TXT

<lang dos> @echo off if %1@==@ ( if exist notes.txt more notes.txt goto done ) echo %date% %time%:>>notes.txt echo %*>>notes.txt

done

</lang>