Created
October 26, 2015 04:38
-
-
Save benwei/b4c6f63e3871f3d450b7 to your computer and use it in GitHub Desktop.
simple dictionary using curl with dict protocol
This file contains 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 | |
## refernce http://www.dict.org/rfc2229.txt | |
word="$1" | |
if [ -z "$word" ]; then | |
echo "syntax: ./dict <word>" | |
exit 1 | |
fi | |
curl "dict://dict.org/d:$word" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment