LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   spell check (https://www.linuxquestions.org/questions/linux-newbie-8/spell-check-932498/)

Micky12345 03-03-2012 07:49 AM

spell check
 
i have a file called file1 and i want to check the spelling of its contents

i wrote
Code:

spell file1
but i got error as spell command not found

i am using fedora 12

is there any other command for this

Snark1994 03-03-2012 07:54 AM

Try
Code:

yum search spell
and install the package which provides the 'spell' command, then run
Code:

yum install <packagename>
. Also consider the 'aspell' command.

Micky12345 03-10-2012 06:28 AM

spell was not working
so i did
Code:

ispell filename
its working nicely

but i want to redirect output of this to a file named result

so i did
Code:

ispell filename > result
i didn't get any error but it was not redirected to the file result

is there any other method to do this

Snark1994 03-11-2012 03:44 AM

What does it do when you type 'ispell filename'? Does it pop up an ncurses interface (ie. an interactive interface made out of characters, on the terminal) or just print out normal output, returning to a prompt?

Micky12345 03-11-2012 11:28 AM

it shows interactive interface to correct the spellings

Snark1994 03-12-2012 06:10 PM

Right, that is why you can't get any output to the pipe - I don't know the ins and outs of it, but if you've got an interactive interface, then it doesn't output stuff in a way that you can redirect to a file. You should be able to run:

Code:

cat filename | ispell list > result
EDIT: To remove duplicates, use

Code:

cat filename | ispell list | sort | uniq > result
Hope this helps,

Micky12345 03-16-2012 10:17 AM

hii Snark1994

wht is this list of ispell list


is it the filename???

Snark1994 03-17-2012 03:23 PM

No, "ispell list" is the command, which prints out a list of the words in the file which are spelt wrong :)


All times are GMT -5. The time now is 03:41 PM.