- [Narrator] Welcome to the 13th video of section two:
Spell Checking and Dictionary Manipulation.
In the previous video,
we have learned about renaming and moving files in bulk.
In this video,
we'll see how to make use of
the dictionary file and spell checker.
Most (mumbles) Linux distributions come with
a dictionary file along with them,
however, I find very few people to be aware
of the dictionary file and hence few make use of them.
There is a command lying utility called Aspell
that functions as a spell checker.
Let's go through a few scripts that make use
of the dictionary file and the spell checker.
Let's see how to do it.
The slash, user, slash, share,
slash, dict, dictionary,
contains some of the dictionary files.
Dictionary files are text files
that contain a list of dictionary words.
We can use this list to check whether a word
is a dictionary word or not.
To check whether the given word is a dictionary word,
use the following script.
The usage is as follows:
Now, we'll see how it works.
In grep, caret is the word start marker
and the dollar character is the word end marker.
Minus Q is used to suppress any output and to be signed
or, alternatively, we can use the spell check,
Aspell, to check whether a word is
in a dictionary or not, as follows.
The Aspell list command returns the output text
when the given input is not a dictionary word
and does not output anything
when the input is a dictionary word.
A minus Z command checks whether dollar output
is an empty string or not.
List all words in a file starting
with the given word, as follows,
or, alternatively, use...
by default if the file name argument
is not given to the look command,
it looks up in the default directory,
slash, user, slash, share,
slash, dict, slash, words,
and returns an output.
When used like this,
it takes default dictionary as file.
For example...
also with success we learned about
spell checking and dictionary manipulation.
In the next video,
we'll learn how to automate interactive input.