A command line crossword solving assistant

Feb 28, '08 07:30:03AM

Contributed by: Anonymous

I'd been looking for a simple way to leverage OS X's built-in Unix dictionary to solve crossword clues, and came up with this little gem of a script:

#!/bin/bash

echo -n "Please enter a word pattern to search for (use a . for unknowns): "
read text

echo `grep -w $text /usr/share/dict/words`
Just paste into your text editor of choice, save somewhere, make sure to chmod +x the file and boom, you have yourself a very simple crossword solver! Granted it isn't perfect, but it's a good start.

[robg adds: Just to clarify, the Unix dictionary isn't the same as the built-in dictionary you access through the Dictionary program. While the Unix words file does hold a large number of words, it doesn't have everything you'll find in Dictionary app.]

Comments (20)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080224044840101