Пример J-1. VIEWDATA.BAT: пакетный файл DOS

Пример J-1. VIEWDATA.BAT: пакетный файл DOS

  1. REM VIEWDATA
  2. REM INSPIRED BY AN EXAMPLE IN "DOS POWERTOOLS"
  3. REM                           BY PAUL SOMERSON
  4. @ECHO OFF
  5. IF !%1==! GOTO VIEWDATA
  6. REM  IF NO COMMAND-LINE ARG...
  7. FIND "%1" C:\BOZO\BOOKLIST.TXT
  8. GOTO EXIT0
  9. REM  PRINT LINE WITH STRING MATCH, THEN EXIT.
  10. :VIEWDATA
  11. TYPE C:\BOZO\BOOKLIST.TXT | MORE
  12. REM  SHOW ENTIRE FILE, 1 PAGE AT A TIME.
  13. :EXIT0