spelling check program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting spelling check program
# 1  
Old 11-18-2003
spelling check program

hi, all
well, it's about spelling check,
give a list of words as command line parameters and determine if they are in the dictionary.
> myDictionary hello helloi
hello is in the dictionary
helloi is not.

if spell command is not allowed to use.
could i use grep -c in this way? if the count number of match is equal to 0, then it's misspelled.
case $# in
*)
for w in $*
do
if {test grep -c "$w" /usr/share/dict/words -ne 0;}
echo "...";
else {test grep -c "$w" /usr/share/dict/words -eq 0;}
echo "...";
fi
done

thank u in advance
Tracy
# 2  
Old 11-18-2003
Re: spelling check program

Quote:
Originally posted by hyo77
if spell command is not allowed to use.
And why can't the "spell" command be used?

However, here's a hint: https://www.unix.com/showthread.php?s...1798#post42539
# 3  
Old 11-19-2003
besides -qi option, the -w option is prefered if you want a exact word match
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Check spelling between two files

Hello, so I was wanting to find a way to check the spelling between two files to see if the terms in both were spelled correctly. However, this won't be for normal words, but for special terms, like "1732_1", to see if it is spelled the same way in one file as in the other, instead of "1732_1" in... (2 Replies)
Discussion started by: Scatterbrain26
2 Replies

2. Shell Programming and Scripting

bash script to check if a program is running

I'm a bit new to bash programming and I was assigned the job of writing a script that will check to see if a program server is running and to restart the program if it is not up. The script is supposed to check the program every hour (which I have looked up and I believe I know how to do) and send... (3 Replies)
Discussion started by: mcknz
3 Replies

3. Shell Programming and Scripting

spell check program

hi, i need to write a spell check program in bash to find all possible spelling errors in a file or a number of files taken as input using usr/dict/words. whenever the program encounters a spelling error, it must state the line number at which the incorrect spelling has occured and... (1 Reply)
Discussion started by: kratos.
1 Replies

4. Programming

how to check memory leak in C program under Unix

Hi, How to detect memory leak in C program under unix ? Thanks (6 Replies)
Discussion started by: useless79
6 Replies

5. Shell Programming and Scripting

Check if a program runs on unix

Hi guys, I had a question last week where I asked how I check from a website hosted on windows if a process is running on on of our unix servers. Vino and Shell Life kindly replied with a perl script: if qm') -gt 0 ] ; then echo "Site is up" else echo "Site is down." # start the... (1 Reply)
Discussion started by: drchris
1 Replies
Login or Register to Ask a Question