Created
March 19, 2013 05:26
-
-
Save jwilkins/5193892 to your computer and use it in GitHub Desktop.
CLI thesaurus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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