home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / misc / 6253 < prev    next >
Encoding:
Text File  |  1992-11-21  |  1.5 KB  |  37 lines

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