[net.nlang] Crossword cheater

kemp@noscvax.UUCP (Stephen P. Kemp) (09/04/85)

Here is a useful alias for interrogating the 4.2bsd wordlist stored in
/usr/dict/words.  It seems to run reasonably quickly, and it allows
regular-expressions so you can do masking and use wildcard characters:


alias words 'set noglob; egrep .*\!*.* /usr/dict/words; unset noglob'


			Some examples:

To find words with 'func' imbedded (not starting in character position one):
	% words ..*func
	defunct
	eigenfunction
	malfunction
	perfunctory
	%
	
To find words ending in 'q':
	% words q$
	Iraq
	q
	%
	
To find five-letter words with third letter 'e' and last letter 'r':
	% words ^..e.r$
	cheer
	clear
	freer
	Greer
	queer
	shear
	sheer
	smear
	sneer
	spear
	steer
	swear
	their
	%
	
To find five-letter words with capital first letter, with third letter 'e'
and fifth letter 'r':
	% words ^[A-Z].e.r$
	Greer
	%