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