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
Download Free eBook - Linux 101 Hacks

Get free Unix tutorials, tips and tricks straight to your email in-box.

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

  1. Command Line Tricks: How To Identify Date and Time of a Unix Command Execution
  2. 15 Examples to Browse Google From Command Line Prompt
  3. Do You Like to Perform Vi Style Editing in BASH Command Line ?
  4. Unix bc Command Line Calculator in Batch Mode
  5. 15 Examples To Master Linux Command Line History
  

Vim 101 Hacks Book

{ 1 trackback }

Destillat KW29-2009 | duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...
July 17, 2009 at 7:31 am

{ 9 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?

Leave a Comment

Previous post:

Next post: