Pastebin command line util
martin f krafft
madduck at debian.org
Thu Nov 2 18:41:20 GMT 2006
> --- Martin Meredith <mez at ubuntu.com> wrote:
>
> > Hey people!
> >
> > I've just been thinking how useful it would be to have some sort of
> > pastebin comamnd line util - so for example, if you're debugging your
> > X.org you can do something like
> >
> > cat /etc/X11/xorg.conf | pastebin
> >
> > and it would just send a URL with a pastebin URL.
This is what I use:
paste () {
RURL=$(echo "lang=Plain+Text&nick=madduck&cvt_tabs=No&desc=&text=$(urlquote)" \
| POST -e http://rafb.net/paste/paste.php \
-H 'Referer: http://rafb.net/paste/' \
| sed -ne 's/^Location: //p')
echo http://rafb.net${RURL%%.html}.txt
}
vpaste () {
TMPFILE=$(mktemp -p vpaste)
trap "rm -f $TMPFILE" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
vi $TMPFILE
paste < $TMPFILE
rm -f $TMPFILE
trap - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
}
--
Please do not send copies of list mail to me; I read the list!
.''`. martin f. krafft <madduck at debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems
NP: Believe / Music from Time & Space (Volume 9)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20061102/867ed78f/attachment.pgp
More information about the ubuntu-devel
mailing list