Skip to content

Instantly share code, notes, and snippets.

@jwilkins
Created March 19, 2013 05:26
Show Gist options
  • Select an option

  • Save jwilkins/5193892 to your computer and use it in GitHub Desktop.

Select an option

Save jwilkins/5193892 to your computer and use it in GitHub Desktop.
CLI thesaurus
#!/bin/sh
#--------
# Command line thesaurus
BROWSER="/usr/bin/env lynx -source"
HTML2TEXT="/usr/bin/env html2text -style compact"
WEBSITE="http://thesaurus.reference.com/search?q=$1"
if test $1; then
${BROWSER} ${WEBSITE} | ${HTML2TEXT} | ${PAGER}
else
echo "Usage: $0 word"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment