-
-
Save IsaacG/4076299 to your computer and use it in GitHub Desktop.
A pastebin downloader
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
pbin () | |
{ | |
case "$1" in | |
http://pastebin.com/*) | |
url="http://pastebin.com/download.php?i=${1##*/}" | |
;; | |
http://pastebin.ca/*) | |
url="http://pastebin.ca/raw/${1##*/}" | |
;; | |
https://gist.github.com/*) | |
url="https://gist.github.com/raw/${1##*/}" | |
;; | |
*) | |
echo "I do not recognize that service"; | |
return 1 | |
;; | |
esac; | |
wget -qO- "$url"; | |
echo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cao bozicu, sta radis na projektu starom 6 godina