home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / gnuish / find12.arc / updatedb.bat < prev   
DOS Batch File  |  1990-09-23  |  781b  |  27 lines

  1. @echo off
  2. rem : updatedb.bat - update fastfind database
  3. rem : Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  4.  
  5. set drives=c:/ d:/ e:/
  6. set codes=c:\scripts\find.codes
  7.  
  8. rem : Change slashes to spaces for proper alphabetization (directories first!).
  9. echo Creating comprehensive list of files for %drives% ...
  10. find %drives% | sed "s!/! !" | sort | sed "s! !/!" > files.srt
  11.  
  12. rem : sort needs the `-S1000' option since the lines are very short (2 chars)
  13. echo Calculating bigrams ...
  14. bigram < files.srt | sort -S1000 | awk -f uniq-c | sort +0.1nr | awk "NR<=128{printf($2)}" >bigrams.srt
  15.  
  16. echo Generating the codes in %codes% ...
  17. code bigrams.srt < files.srt > %codes%
  18.  
  19. echo Cleaning up ...
  20. rm  files.srt bigrams.srt
  21. set drives=
  22. set codes=
  23.  
  24. echo Done.
  25.  
  26.  
  27.