home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9330 < prev    next >
Encoding:
Text File  |  1992-09-13  |  1.7 KB  |  50 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!caen!destroyer!ubc-cs!yogi
  3. From: yogi@cs.ubc.ca (Yossi Gil)
  4. Subject: Re: Another MsDos batch programming challenge
  5. Message-ID: <1992Sep13.194215.24100@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: <1992Aug29.063552.26386@uwasa.fi> <1992Aug29.152816.14977@cs.ubc.ca> <FRDQB0DG@dri.com>
  9. Date: Sun, 13 Sep 92 19:42:15 GMT
  10. Lines: 38
  11.  
  12. >>
  13. >>cd >> %0
  14. >>echo echo %%set%% >> %0
  15. >>set set=^Z
  16. >>
  17. >>(The above should be invoked with the .BAT extension. It should 
  18. >>be quite easy to remove this restriction)
  19.  
  20. >This is very clever but doesn't its self-modifying behavior cause it 
  21. >to fail after one use?  (The location of the end-of-file marker, ^Z, 
  22.  
  23. This is my own way of abusing the contest rules...
  24.  
  25. >is important in your scenario.)  And wouldn't CD be a better environment 
  26. >variable name than SET?  In any case, I can't come up with something
  27.  
  28. Who says it has to be clear?
  29.  
  30. >that works even once! :-(
  31.  
  32. If you really care you could wrap it so that it could be invoked
  33. several times. But even so, this is not the remedy of all batch file
  34. problems. One has to use 4DOS or write a real program for all the
  35. serious stuff. Batch file tricks are just like three-legged races.
  36. Slow, funny  and cumbersome yet challenging and sometimes even
  37. quite funny.
  38.  
  39. >--
  40. >Jimmy Liberato   liberato@dri.com
  41. >                 ...uunet!drivax!liberato
  42.  
  43.  
  44.  
  45. --
  46. Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
  47. Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
  48. 6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
  49. Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
  50.