home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / alt / msdos / programm / 3112 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.2 KB  |  37 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
  2. From: holland@matt.ksu.ksu.edu (Rich Holland)
  3. Newsgroups: alt.msdos.programmer
  4. Subject: Re: Help Required with Dos variables
  5. Date: 7 Jan 1993 13:35:52 -0600
  6. Organization: Kansas State University
  7. Lines: 25
  8. Message-ID: <1ii0moINN62a@matt.ksu.ksu.edu>
  9. References: <1993Jan4.160029.26833@newton.ccs.tuns.ca> <L6eZwB1w164w@jaflrn.UUCP>
  10. NNTP-Posting-Host: matt.ksu.ksu.edu
  11.  
  12. Jon Freivald <jaf@jaflrn.UUCP> writes:
  13.  
  14. >macdonak@newton.ccs.tuns.ca (Kevin MacDonald) writes:
  15.  
  16. >> Is there any way to display the contents of a single DOS variable?
  17. >> I know you can display all current variables by typing SET, but there
  18. >> doesn't appear to be any way to display variables individually.
  19.  
  20. Sure it does!
  21.  
  22. >DOS batch file:
  23. >    echo %USER% > logfile
  24.  
  25. Yeah, those work, but then you have 'logfile' to deal with.  What's wrong
  26. with this:  'SET | FIND USER'
  27.  
  28. He's not trying to copy USER to NEWUSER, or he could use:
  29. SET NEWUSER=%USER%
  30.  
  31.  
  32. -- 
  33. Rich Holland              | INTERNET: holland@matt.ksu.ksu.edu
  34. 100 Jardine Terr., Apt A7 | BITNET  : holland@ksuvm
  35. Manhattan, KS  66502-3357 | UUCP    : ...!rutgers!matt.ksu.ksu.edu!holland
  36. char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  37.