What are some different options to spell check files within a certain directory, and print results to a shell? For example, file1 has incorrect spelling at line 4..etc.
Asked
Active
Viewed 662 times
1
-
2how far you've gone? I meant, the implementation. – Kent May 14 '20 at 21:48
-
What kind of files are you referring to? If they're text, you can install `spell` (`sudo apt install spell`) and run `find dir -type f -print -exec spell {} \; – lurker May 15 '20 at 01:17
-
1You may take advantage from [spell checker shell script](https://stackoverflow.com/questions/35734849/) and [spell checking a file](https://stackoverflow.com/questions/12453196/). – U880D May 15 '20 at 04:30
1 Answers
1
This is a script that asks the user for a folder to print each filename in the folder and then a sorted list of misspelled words together with the number of times they occur then helps the user correct the listed misspelled words in each file.
#! /bin/bash
for f in *.txt ; do
echo $f
aspell list < $f | sort | uniq -c
done
echo "Please correct misspelled words..."
for f in *.txt; do
aspell check $f
done

Maximilian Ballard
- 815
- 1
- 11
- 19

Joel Emmanuel
- 11
- 1