Script to Post Terminal Output To Pastebin September 12, 2005Posted by Carthik in applications, snippets, ubuntu.
A pastebin site is a site where users can post just about anything in text for others to look at. This is handy when it comes to requesting support at the #ubuntu support channel, for example. Suppose someone says “paste the output of lspci” you can use Dennis’ script to do the job for you and point the person to the pasted output from the terminal. If you use the neat little pastebin script, then you can redirect the output from the terminal and have it pasted in the pastebin of your choice without having to do the copying and pasting manually. Neat!
After you install the script, you can use it to
a) Paste standard output:
For example, to paste the output of lspci, do
$ lspci > pastebin
b) Paste output and error messages:
$command >pastebin 2>&1
where “command” is the name of the command for which you want the output and the error messages to be recorded.
and so on… it can make life a lot easier!