- #!/bin/bash
- if [ $# -ne 1 ]; then
- echo "Usage: $0 filename"
- exit 1
- fi
- if [ ! -f "$1" ]; then
- echo "File $1 does not exist."
- exit 1
- fi
- TMPFILE=$(tempfile)
- #echo "Temp File: $TMPFILE"
- curl -s -c $TMPFILE -H Expect: -d username=<USER> -d password=<PASS> http://kpaste.net/login
- curl -s -D- -b $TMPFILE -H Expect: --data-urlencode code2@$1 -d paste=Send -d private=no -d expiry=d -d format=text http://kpaste.net | grep Location: | awk '{print "http://kpaste.net" $2}'
- rm -f $TMPFILE
kpaste submit bash script
Posted by Anonymous on Tue 19th Jul 2011 13:28
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.