[comp.sys.ibm.pc] I/O Redirection in Remarks

few@quad1.quad.com (Frank Whaley) (07/08/89)

For several days I've been trying to figure out who creates a zero-length
file called 'compile' in one of my source directories.  I kept deleting
it, but it kept coming back.  Today I found the following line in a
regularly-used .BAT file:

	REM mk.bat -> compile one directory
                    ^^^^^^^^^
Appears under both DOS 4.0 and DOS 3.30 (under VP/ix).
-- 
Frank Whaley
Senior Development Engineer
Quadratron Systems Incorporated
few@quad1.quad.com
uunet!ccicpg!quad1!few

Water separates the people of the world;
Wine unites them.

bobmon@iuvax.cs.indiana.edu (RAMontante) (07/14/89)

Yep, the shell unavoidably treats `<', `>', and `|' as redirection in
all MS-DOS versions I remember.  This applies to the "echo" command
as well as "remark"s, but NOT to labels that start with colons.

I don't use remarks in batch files much; the ":label" works better as a
remark (unless the first word matches an actual label in the file) than
real remarks do --- two fewer characters, cleaner appearance, no stupid
redirection.