dostips should have a section for "interesting behaviors".
Another thing about rem is the effect of the dot:
Code: Select all
rem &echo this line will not be printed
rem.&echo this line will be printed
Code: Select all
rem &echo this line will not be printed
rem.&echo this line will be printed
Code: Select all
(echo.N cr.txt&echo.e 100 0d 0d&echo.r cx&echo.02&echo.w 100&echo.q)|debug>NUL
echo %COMPUTERNAME%