Tuesday, June 24, 2008

Spelling with ispell and related tasks

Change default ispell dictionary:
dpkg-reconfigure ispell
or:
select-default-ispell

Using ispell by non-interactive way:
echo string | ispell -a | grep -v 'Ispell version' | grep -v '^

Optionaly we can define another dictionary:
ispell -d dictionary_name

We can choose the dictionary from istalled files:
ls /usr/lib/ispell/*.hash | sed 's/.*\///' | sed 's/.hash//'

One kind of errrors while using xargs:
xargs: unmatched double quote
OR:
xargs: unmatched single quote
Solution:
find . -type f -print | xargs grep pattern

I experienced error message while using iconv:
iconv illegal input sequence at position 0
Solution:
ispell --null

Converting UTF8 to 7bit ASCII:
iconv -f UTF-8 -t ASCII//TRANSLIT < input.txt > output.txt