When I quickly need to post the output of a command, or to share some text file, I use the sprunge.us service.
It is a Free command line pastebin, dedicated to the aliens seen in Futurama, which have an organ called the “sprunger” that is used for sniffing out information.
To share a file, just do:
$ cat FILE | curl -F 'sprunge=<-' http://sprunge.us
and sprunge will send you back a URL like http://sprunge.us/VRXT, that you could share.
Append the symbol “?” followed by the language your file is written in to that URL, and you’ll get line numbering and syntax highlighting:
http://sprunge.us/VRXT?bash http://sprunge.us/VRXT?perl http://sprunge.us/VRXT?c
Here is the list of available programming language.
To pipe the output of any command execute:
$ COMMAND | curl -F 'sprunge=<-' http://sprunge.us
You can create a bash shell function as follows (add to your ~/.bashrc):
# Share the output of a command
sprunge() {
curl -F 'sprunge=<-' http://sprunge.us
}
Reload .bashrc file.
$ . ~/.bashrc
Now use sprunge to share any text file or the output of any command:
$ COMMAND | sprunge $ cat FILE | sprunge