jump to navigation

Script to Post Terminal Output To Pastebin September 12, 2005

Posted by Carthik in applications, snippets, ubuntu.
trackback

Dennis has a neat little python script called pastebin which can be used to automatically and easily paste the output from your terminal to a pastebin site.

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!

Usage:
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!

Comments»

1. Jordan T. Cox - September 12, 2005

Just wanted to say, kickass site. Keep the Ubuntu tips coming!

2. ubuntonista - September 13, 2005

You bet!

3. Michael Hehn - January 3, 2007

Hi, my name is Michael and security is very important. In fact, one day I lost all my sites, too. Now, a few months later, I know how to protect myself.
You can have a look at Secure
Regards
Michael

4. Home - August 17, 2007

Thanks for sharing this information. Really is pack with new knowledge. Keep them coming.