home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / ibm / pc / misc / 15741 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1007 b   |  38 lines

  1. Newsgroups: comp.sys.ibm.pc.misc
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!lynx!news
  3. From: galway@chtm.eece.unm.edu (Denis McKeon)
  4. Subject: Re: How to create a "more" batch file?
  5. Message-ID: <d4#rkmk@lynx.unm.edu>
  6. Date: Sun, 13 Dec 92 04:31:04 GMT
  7. Organization: Connemara - Computing for People
  8. References: <1992Dec11.235700.19707@mnemosyne.cs.du.edu>
  9. X-Mailer: Mail User's Shell (7.0.1 12/13/89)
  10. Bcc: mrosen@nyx.cs.du.edu
  11. Status: OR
  12. Lines: 24
  13.  
  14. In article <1992Dec11.235700.19707@mnemosyne.cs.du.edu> mrosen@nyx.cs.du.edu (Michael Rosen) writes:
  15. >Is there a way I can write a batch file that will ... 
  16. >...
  17. >type file.txt |more
  18.  
  19. At the risk of feeding a how-many-ways-are-there-to ... thread,
  20. ( "create a double space-ing filter in Unix" was my favorite )
  21. here is one way, with no error checking and barely any prompting.
  22.  
  23.     @echo off
  24.     :loop
  25.     more < %1
  26.     shift
  27.     if %1.==. goto quit
  28.     echo next file: %1
  29.     pause > nul:
  30.     goto loop
  31.     :quit
  32.  
  33. --
  34. Denis McKeon
  35. galway@chtm.eece.unm.edu
  36.  
  37. QED: Quit and Eat Dinner
  38.