I have never understood why automatically pasting to a pastebin service should be so hard as in "I need a huge script to do the job!".
Luckily, once in a while there are smart people that build good and simple applications. Enter sprunge, the first truly sane pastebin service. Need to know how it works? You'll find the man page on their website (no, really). – No listing of pastes. No annotation, comments, amendments. No foobar. Paste away!
$ sprunge < ~/bin/sprunge
http://sprunge.us/OcPR
$ wget -qO- http://sprunge.us/OcPR
#!/bin/sh
exec curl -F 'sprunge=<-' http://sprunge.us