diff --git a/urbandictionary.com/urbandict b/urbandictionary.com/urbandict new file mode 100755 index 0000000..3b87f8b --- /dev/null +++ b/urbandictionary.com/urbandict @@ -0,0 +1,6 @@ +#!/bin/bash +word="$1" +curl -s http://www.urbandictionary.com/define.php?term=`echo -n "$word" | urlencode` | +perl -ne 's//\n/sg; s/(.*?)<\/a>/$1/sg; /
(.*?)<\/div>/ms and print "\n$1\n"; /
(.*?)<\/div>/ and print "\t$1\n"' | +htmldecode +