.

Labels

.

Check a word's spelling


script to check a word's spelling
The script uses aspell . A short simple one liner in terminal   echo [word ] | aspell -a   will do the work , but the script makes it more convenient and the output is screened to give only what is needed. 



-------------------------------------------------------------------------------------------------------------------------------------------------
HOW THIS SCRIPT WORKS:
Nothing to explain.The script just edits the output of 'aspell' with 'sed'
-------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

#!/bin/bash

#to check or find the correct spelling of the given word

found=$(echo "$*" | aspell -a | sed "s/@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707)//g" | cut -d : -f 2 | sed 's/,/\n/g')
echo -e "\e[1;34mdid you mean \e[0m:$found"


-------------------------------------------------------------------------------------------

In my case the script is named spell . To check whether definitly is the correct spelling , type spell definitly in terminal and just press enter..







OK. It is definitely 'definitely' and not definitly :)

Enjoy Linux !!


Don't know what to do with these codes ?? click here

1 comment:

  1. spell chatbot

    did you mean :
    chat bot
    chat-bot
    (... 22 more)

    ReplyDelete