Using pbpaste

I would like to use http://pastie.caboo.se/paste/4703 from the command
line, but the syntax escapes me :frowning:

[email protected] ~/Desktop $
[email protected] ~/Desktop $ cat pbpaste.rb
#!/bin/sh

With a little automator workflow, quicksilver magic, and a judicious

placement of pbpaste on the next line you can paste with almost no

effort at

all.

url=$(curl http://pastie.caboo.se/pastes/create
-H “Expect:”
-F “paste[parser]=plaintext”
-F “paste[body]=<-”
-s -L -o /dev/null -w “%{url_effective}”)

echo -n “$url” | pbcopy
echo “$url”
[email protected] ~/Desktop $
[email protected] ~/Desktop $ ruby pbpaste.rb

how do I generate a URL like wgetpaste does?

[email protected] ~/Desktop $
[email protected] ~/Desktop $
[email protected] ~/Desktop $ wgetpaste

ahhh, this one works fine from gentoo.
Your paste can be seen here: http://rafb.net/p/UpiiMu57.html
[email protected] ~/Desktop $

thanks,

Thufir

Dude, don’t put yourself through that kind of pain. The next version
of my Utility Belt gem will have a pastie command-line tool. It
already has one for IRB.

Utility Belt! Only $9.99! Call now!

On 1/2/08, Thufir [email protected] wrote:

url=$(curl http://pastie.caboo.se/pastes/create
how do I generate a URL like wgetpaste does?

thanks,

Thufir

–
Giles B.

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com