Last active
March 17, 2016 17:48
-
-
Save marduk191/0604901fbcb56b44413f to your computer and use it in GitHub Desktop.
A small shellscript for pasting to hastebin from the command line
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
Hastebin CLI | |
#Add to ~/.bashrc | |
haste() { a=$(cat); curl -X POST -s -d "$a" http://hastebin.com/documents | awk -F '"' '{print "http://hastebin.com/"$4}'; } | |
alias copy="xclip -selection c" | |
##Usage: | |
#Open terminal | |
#Type "cat <filename> | hastebin | copy | |
#"echo this is my text | hastebin | copy | |
##For RAW | |
#"echo "this is my text" | hastebin --raw | copy" | |
#"hastebin file --raw |copy" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment