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.