home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.misc
- Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!fuzzy
- From: fuzzy@netcom.com (Fuzzy Fox)
- Subject: Re: Echo command in batch files
- Message-ID: <1992Nov22.043529.5949@netcom.com>
- Organization: Foxes 'R' Us - Seven locations to serve you
- References: <1992Nov19.163626.1@violet.ccit.arizona.edu> <1992Nov20.020415.8774@organpipe.uug.arizona.edu> <1992Nov20.220337.1@violet.ccit.arizona.edu>
- Distribution: world,local
- Date: Sun, 22 Nov 1992 04:35:29 GMT
- Lines: 25
-
- f67700241@violet.ccit.arizona.edu (Greg Franklin) writes:
-
- >As I understand it, I thought COMMAND.COM scanned the command line
- >left to right, and when reaching a > or >>, parsed the remainder as a
- >filename and ignored what it couldn't understand.
-
- No. DOS takes the next "word" after the > or >> symbol and uses that as
- the filename to redirect to. This is more or less how Unix shells work.
-
- echo hello world >temp
- echo >temp hello world
-
- These do about the same thing, but the spaces appear in different
- places, since DOS does not remove spaces.
-
- >"echo a > temp b >> temp" is undefined, I think.
-
- I think DOS will accept the last redirect on the line, so >temp is
- ignored, and >>temp causes an append to file 'temp'.
-
- --
- #ifdef TRUE | Fuzzy Fox fuzzy@netcom.com
- #define TRUE 0 | a.k.a. David DeSimone an207@cleveland.freenet.edu
- #define FALSE 1 | "You have been recruited by the Star League to defend
- #endif | the Frontier against Xur and the Kodan Armada."
-