Spellcheck using the commandline
If your anything like myself, I find I use google as a spellchecker more often then anything else, however having to wait for firefox to load when I’m trying to type in irc and don’t know the spelling of a word takes up alot of my time and slows the conversation down as well.
A great post from Stormdragon has shown me a great and easy way to do this using a program called hunspell.
Following most of his steps you can do this as well on any debian / Ubuntu / Linux Mint pc.
First install hunspell and it’s english library.
|
1 |
sudo apt-get install hunspell hunspell-en-us |
then cd over to your ~/bin/ directory
|
1 |
cd ~/bin/ |
create and edit a file named “spellcheck”
|
1 2 |
sudo touch spellcheck sudo gedit spellcheck |
Enter in the following script
|
1 2 3 |
#!/bin/bash echo “$@” | hunspell exit 0 |
then save and close gedit.
Now we need to make the file executable
|
1 |
sudo chmod 755 spellcheck |
Then just close and reopen your terminal of choice (I prefer terminator myself) and try out your new spellchecker!
|
1 |
spellcheck whatever you cant spell |
Correctly spelled words will just respond with an “*” if a word is misspelled it will offer you suggestions! Just that easy! Yea BASH!
Midori 0.2.2 on
GNU/Linux
Firefox 3.6.9 on
Linux Mint 9 x64
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Thanks for the trackback. When in the ~/bin directory it is not necessary to use sudo. You only need to use it if you were to make it available system wide by putting it in /usr/bin/. In ~/bin it is made executable for the specific user who installed it so it will work with a 700 permission.