Become a Better Writer from Unix Command Line

by SathiyaMoorthy on July 15, 2009

Linux command to correct spelling

Photo courtosey: andreasnilsson1976

In this article let us review how to correct spelling of a word, identify meaning for a word, identify antonym for a word right from Unix / Linux command line.

1. Lookup Words Beginning with a Given String Using Look Command

Look-up the correct spelling for a word using Unix look command as shown below.

$ look typogr
typograph
typographer
typographers
typographia
typographic
typographical
typographically
typographies
typographist
typography

As shown in the example above, given the argument ‘typogr’, look command displays all the word that starts with the given string.

Note: You should specify the correct spelling of initial part of the word as argument.

2. Find Meaning of a Word Using Mean Command

mean command displays the meaning of a given word as shown below. If you can’t find this command on your system, you should install it from your OS distribution repository.

$ mean philosophy
Overview of noun philosophy

The noun philosophy has 3 senses (first 3 from tagged texts)

1. (12) doctrine, philosophy, philosophical system, school of thought, ism -- (a belief (or system of beliefs) accepted as authoritative by some group or school)
2. (8) philosophy -- (the rational investigation of questions about existence and knowledge and ethics)
3. (1) philosophy -- (any personal belief about how to live or how to deal with a situation; "self-indulgence was his only philosophy"; "my father's philosophy of child-rearing was to let mother do it")

Synonyms/Hypernyms (Ordered by Estimated Frequency) of noun philosophy

3 senses of philosophy

Sense 1
doctrine, philosophy, philosophical system, school of thought, ism
       => belief

Sense 2
philosophy
       => humanistic discipline, humanities, liberal arts, arts

Sense 3
philosophy
       => belief

3. Find Meaning of a Word Using Dict Command

dict command displays meaning of the word by communicating with dict.org as shown below. If you can’t find this command on your system, you should install it from your OS distribution repository.

$ dict philosophy
...
     1. Literally, the love of, inducing the search after, wisdom;
        in actual usage, the knowledge of phenomena as explained
        by, and resolved into, causes and reasons, powers and
        laws.
        [1913 Webster]
...

4. Find Meaning of a Word Inside Vi / Vim Editor

It is easy for vimmers to create following short cut to lookup the meaning for a particular word from the Vim editor.

map <F3> :exe ":!dict ".expand("<cword>")

When you are on a particular word and want to know the meaning of a word, Press F3 to see the meaning of a word.

If you are not familiar with the map command in vim, read our Vim tips article that talks about Vi / Vim Editor Macro, Mark and Map Examples.

5. Find Antonym of a Word Using Wn Command

wn command can be used with appropriate options to find antonym of a word as shown below.

$ wn search-str -antsa
  • WordNet command
  • search-str: string to search
  • -ants: antonyms

(n | v | a | r) – antonym for noun | verb | adjective | adverbs

6. If all Fails, Ask G

If you are not able to look-up meaning of a word by any of the above methods, type the following in the google search box, as we explained in our previous Google Tips and Tricks article.

define: WORD

Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

{ 11 comments… read them below or add one }

1 Raja July 15, 2009 at 1:01 am

Darn. was just about to blog on this. Oh well, I guess I’m left with ispell. Good tips though :)

2 Mahesh July 15, 2009 at 6:25 am

Nice, please also checkout the ispell command too.

3 Marcus Rhodes July 15, 2009 at 6:51 am

So, where can I find ‘mean’ for Ubuntu?

4 siniranji July 15, 2009 at 7:15 am

even young kids started using your tips and tricks / all these linux stuff. Good work, i need like these whoever reads these things should broadcast or spread awareness to all.

5 John July 15, 2009 at 7:34 am

I am unable to find a package supplying the “mean” command in the Ubuntu repo’s. Anyone know the name of the package it is in, or if there is a deb for it available elsewhere?

6 Roman July 15, 2009 at 8:01 am

Thanks for the article! May someone point me to a package ‘mean’ command is a part of? Ubuntu does not seem to recognize it via its apt-get system, and Google throws too many results…

7 Vince Stevenson July 15, 2009 at 9:12 am

Thanks for this article. I’d like to investigate this one a bit more. Rgds Vince

8 Ramesh Natarajan July 20, 2009 at 12:26 am

@Raja, @Mahesh,

I guess Aspell will eventually replace ispell. It’s a great spell checker. Thanks for bringing it to our attention.

@Marcus, @John, @Roman,

mean might have been obsolete. I’ll keep you posted on this very soon.

@Siniranji, @Vince,

Thanks for your very kind words. I’m very glad you found this article helpful.

9 kishore July 20, 2009 at 12:46 pm

fedora 11 does not support some commands what we need to do? do u suggest?

10 Celsius1414 May 2, 2010 at 10:52 pm

Also check out diction and style: http://www.gnu.org/software/diction/diction.html

“Diction and style are two old standard Unix commands. Diction identifies wordy and commonly misused phrases. Style analyses surface characteristics of a document, including sentence length and other readability measures.

“These programs cannot help you structure a document well, but they can help to avoid poor wording and compare the readability (not the understandability!) of your documents with others.”

11 Curt May 30, 2013 at 7:08 am

“Ramesh Natarajan July 20, 2009 at 12:26 am

@Marcus, @John, @Roman,

mean might have been obsolete. I’ll keep you posted on this very soon.”

I’m looking for mean also.

Leave a Comment

Previous post:

Next post: