Last active
December 27, 2015 18:49
-
-
Save shawndumas/7372698 to your computer and use it in GitHub Desktop.
Explain
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/bash | |
#brew install gnu-sed | |
#ln -s /usr/local/bin/gsed /usr/local/bin/sed | |
URL=$(echo "http://explainshell.com/explain?cmd=$1+${@:2}" | sed -e 's/ /+/g') | |
curl -s "$URL" | sed -n '/<pre/,/<\/pre>/p' | sed -n '/<pre/,/<\/pre>/p' | sed -s 's/<[^>]*>//g' | \ | |
sed -e 's/^ *//g;s/ *$//g' | grep '.' | cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment