home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8624 < prev    next >
Encoding:
Text File  |  1992-08-19  |  2.2 KB  |  80 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!gumby!destroyer!ubc-cs!yogi
  3. From: yogi@cs.ubc.ca (Yossi Gil)
  4. Subject: Re: A batch programming contest for you
  5. Message-ID: <1992Aug19.165833.21324@cs.ubc.ca>
  6. Sender: usenet@cs.ubc.ca (Usenet News)
  7. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  8. References: <1992Aug18.052017.3758@uwasa.fi> <1992Aug18.213600.27969@cs.ubc.ca> <4941@blue.cis.pitt.edu.UUCP>
  9. Date: Wed, 19 Aug 92 16:58:33 GMT
  10. Lines: 68
  11.  
  12. infidel+@pitt.edu (Todd J Derr) writes:
  13.  
  14. >In article <1992Aug18.213600.27969@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
  15. >>
  16. >>Don't know about useful, but interesting... Well, how about the self
  17. >>printing batch program that I posted to alt.hackers some time ago:
  18. >>
  19. >>SELFPRNT.BAT:
  20. >>    Bad command or file name
  21. >>
  22. >>And yet another teaser: The above batch file doesn't self print
  23. >>on 4DOS! 
  24.  
  25. >well, it doesn't self-print with COMMAND.COM either...  when you "List"
  26. >it:
  27.  
  28. >C:>type selfprnt.bat
  29. >Bad command or file name
  30. >Bad command or file name
  31. >...
  32.  
  33. >and when you execute it:
  34.  
  35. >C:>selfprnt
  36.  
  37. >C:>Bad command or file name
  38. >Bad command or file name
  39.  
  40. >C:>Bad command or file name
  41. >Bad commmand or file name
  42.  
  43. I believe there is a typo in the above: Only one of the two pairs
  44. of lines shows up.
  45.  
  46. >close...  but you are supposed to get *The Same* output if you "List" it
  47. >or Execute it- and you don't.
  48.  
  49. Stricly speaking, the output is only one "Bad command or file name".
  50. In fact, none of them are the output: one is the standard error
  51. and the other is just an echo. But, otherwise if you wish to consider
  52. the echo as output then I suppose you could always do
  53.  
  54. REM blah
  55.  
  56. Not mentioning the ultimate:
  57.  
  58.     CTTY NUL
  59.  
  60. or even the more destructive
  61.  
  62.     CTTY CLOCK$ 
  63.  
  64.  
  65.  
  66. >later,
  67.  
  68. >todd.
  69.  
  70. >-- 
  71. >todd j. derr - the c.o.m.a. moderator!  "i've got nothing to say but
  72. >infidel+@pitt.edu       (412) 363-9027   it's ok."
  73. >infidel@pittunix (BIT)  work: 648-1247 
  74. >if your mail bounces, send it to infidel@unix.cis.pitt.edu.  thanks!
  75. --
  76. Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
  77. Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
  78. 6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
  79. Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
  80.