using pbpaste

T

Thufir

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

thufir@arrakis ~/Desktop $
thufir@arrakis ~/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"
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ ruby pbpaste.rb

how do I generate a URL like wgetpaste does?

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ wgetpaste

ahhh, this one works fine from gentoo.
Your paste can be seen here: http://rafb.net/p/UpiiMu57.html
thufir@arrakis ~/Desktop $



thanks,

Thufir
 
G

Giles Bowkett

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!

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

thufir@arrakis ~/Desktop $
thufir@arrakis ~/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"
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ ruby pbpaste.rb

how do I generate a URL like wgetpaste does?

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ wgetpaste

ahhh, this one works fine from gentoo.
Your paste can be seen here: http://rafb.net/p/UpiiMu57.html
thufir@arrakis ~/Desktop $



thanks,

Thufir


--
Giles Bowkett

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top