home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15197 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.3 KB  |  50 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!widenius
  3. From: widenius@klaava.Helsinki.FI (Risto Widenius)
  4. Subject: Re: dictionary search
  5. Message-ID: <1993Jan6.054639.23826@klaava.Helsinki.FI>
  6. Keywords: dictionary search 
  7. Organization: University of Helsinki
  8. References: <1993Jan5.223437.16029@mnemosyne.cs.du.edu>
  9. Date: Wed, 6 Jan 1993 05:46:39 GMT
  10. Lines: 38
  11.  
  12. sscrivan@nyx.cs.du.edu (steve scrivano) writes:
  13.  
  14. >Could someone who has access to a site with a dictionary of 200,000 English 
  15. >words or more be so kind as to run this script and e-mail me the "out.file".
  16.  
  17. [horror sed script deleted]
  18.  
  19. I don't know how intelligent sed implementations generally are in
  20. parsing regular expressions, but shorter seems better to me in any case.
  21.  
  22. This is the same script that Jean-Pierre Radley posted; with some excess
  23. dots stripped to make it work like expected. Otherwise I have to stress
  24. that this is jpr's excellent work:
  25.  
  26.     </usr/dict/words tr '[A-Z]' '[a-z]' |
  27.     sed '
  28.     /^.$/d
  29.     /^..$/d
  30.     /^...$/d
  31.     /[abdjkmqv-z0-9]/d
  32.     /c.*c/d
  33.     /e.*e.*e/d
  34.     /f.*f/d
  35.     /g.*g/d
  36.     /h.*h/d
  37.     /i.*i.*i/d
  38.     /l.*l.*l/d
  39.     /n.*n.*n/d
  40.     /o.*o/d
  41.     /p.*p.*p/d
  42.     /r.*r.*r.*r/d
  43.     /s.*s.*s/d
  44.     /t.*t.*t.*t/d
  45.     /u.*u/d
  46.     ' > out.file
  47.  
  48. --
  49. widenius@cc.helsinki.fi "But now there was worse." -Bernard Levin
  50.