Is it "grep' (william crosby)

Carl Dichter dichter at soleil.sps.mot.com
Tue Jan 8 05:34:03 AEST 1991


On bsd UNIX the spelling lists are usally at /usr/dict/words.

They can be searched with grep, like this:
	grep -i gry /usr/dict/words

Or, if you know how a word starts you can use "look", which searches
a sorted list and if not given a list to search, defaults to the
spelling list also. If we want to find words that started with "gry",
we would use:
	look gry

Another way to find words ending with "gry", and not worry about
where the list is, would be to use grep and look together. For
example:
	look . | grep -i "gry$"

The spelling lists on System 5 UNIX are hashed, and therefore 
impossible to search with a partial word. The speller does it by pairing
the word with common beginnings and endings.

Hope this helps.

Carl R. Dichter 
Staff Software Engineer/Scientist
Motorola ASIC Division
Email: dichter at soleil.sps.mot.com



More information about the Comp.unix.internals mailing list