Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Shell script to look up words at dictionary.com from the command line

The following will look up a word on dictionary.com from the command line, where $1 is the word you want to look up, entered in as a parameter on the command line. (Lynx is a text-based browser that handles the html-to-text conversion for us.)

#!/bin/sh 
lynx -dump -nolist -pseudo_inlines                \
  'http://dictionary.reference.com/search?q='$1'&r=67'  \
  | tail -n +13 | less -r
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS