Showing posts with label dictionary. Show all posts
Showing posts with label dictionary. Show all posts

Friday, February 12, 2010

Spelling and Dictionary Lookups at Bash Command Line

If you've ever wanted an easy way to look up a word in the dictionary, or spell check a word at the command line (in Linux), I've come up with a simple way to do it.

First, make sure you have aspell and curl installed, then simply paste the following functions into your .bashrc file:

function dictlookup
{
curl dict://dict.org/d:$1
}

function spellcheck
{
echo "$1" | aspell -a -c | grep "&"
}

Now you can do things like this:

> spellcheck antecedant

and:

> dictlookup antecedent

Enjoy!