Forwarding Address: OS X

Saturday, October 12, 2002

Some nifty but obscure (obscure to relative Unix newbies like me anyway) things come along with the BSD layer. For instance there's the "look" command, which by default searches /usr/share/dict/words (a list of about 250,000 English words and proper names). You can't use regular expressions with "look", though. For more flexibility (let's say you're a word-game nut), define this alias:
alias words cat /usr/share/dict/words | egrep
To mimic the behavior of look foo you'd type words -i ^foo, but now you can do many more cool and useless things (like finding all words in which the letters "abcde" appear in sequence: words "a.*b.*c.*d.*e"). You'll be completing impossible rhyming couplets faster than you can say "zygosporange."