You can experiment with the following commands:
yes 0 | script -c 'ispell text.txt' /dev/null
or
yes 1 | script -c 'aspell check text.txt' /dev/null
But keep in mind that results can be bad even for simple things:
$ echo The quik broown fox jmps over the laazy dogg > text.txt $ yes 0 | script -c 'ispell text.txt' /dev/null Script started, file is /dev/null Script done, file is /dev/null $ cat text.txt The quick brown fox amps over the lazy dog
It seems even worse with aspell, so it's probably best to go with ispell.
You need a script command because some commands, such as ispell, do not want to be a script. Usually, you should output yes 0 to a command to simulate pressing the 0 key all the time, but some commands detect a script and refuse to cooperate:
$ yes 0 | ispell text.txt Can't deal with non-interactive use yet.
Fortunately, they can be fooled by the script command:
$ yes 0 | script -c 'ispell text.txt' /dev/null Script started, file is /dev/null Script done, file is /dev/null
You can use a file other than / dev / null to log the output:
$ yes 0 | script -c 'ispell text.txt' out.txt Script started, file is out.txt Script done, file is out.txt $ cat out.txt Script started on Tue 02 Feb 2016 09:58:09 PM CET Script done on Tue 02 Feb 2016 09:58:09 PM CET
rsp
source share