Created
August 30, 2013 11:47
-
-
Save ekyo/6389069 to your computer and use it in GitHub Desktop.
Bash script for querying explainshell.com from the command line. Requires curl to be installed.
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 | |
URL=$(echo "http://explainshell.com/explain/$1?args=${@: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
Exemple Usage: