E-Mail:

The Dictionary

The Dictionary

One of the useful core functions of Linux is the dictionary file. It’s a system file that contains common words in the install language. The system dictionary is used by aspell and ispell, among others, to check your spelling when composing a document.

You can check for specific words in you system dictionary in a couple of ways. look is easily the quickest and easiest to use. The convention for using look to find words in the system dictionary is:

    look [options] string [file]

The options available are -a (use an alternate dictionary), -d (compare only alphanumeric characters), and -f (search isn’t case sensitive). It’s a pretty simple set of options. So, if you want to check the word “individual” in the dictionary, you’d execute the following command:

    look -df individual

look will return all the lines in the dictionary that contain the string individual. If you’re using the default dictionary, normally located at /usr/share/dict, you won’t need to use the file option.

As you’ve seen so many other times, there’s another way to accomplish this same task. Using the cat command in combination with grep, you can achieve the same result:

    cat /usr/share/dict/words | grep individual

With this command, you open the /usr/share/dict/words file, piping the output to grep, which parses through the file looking for the string “individual.” It’s probably not as efficient as look, but it still gets you to the same place; a quick check of the system dictionary in Linux.

What Do You Think?

 

Want to Start a Blog Here for Free?

Are you an expert in one subject or another? If your goal is to help others and dispense hard-earned information back to the community, stake a claim on your very own Lockergnome blog today! You can write about anything - no matter the topic. Sign-up to start blogging!

64 queries / 0.742 seconds.