#!/bin/bash # A Script that automates pasting to pastebin(s).. # based on http://floyd-n-milan.blogspot.com/2006/11/bash-script-to-post-on-pastebins.html # but uses wget instead of curl and supports only rafb.net ###################################################################### showusage() { cat 1>&2 <&1 | sed -n 's|^.*Location:\ \(http://rafb.net/p[^\ ]\+\).*$|\1|p') if [[ "${url}" == "http://rafb.net/p/toofast.html" ]]; then echo "You must wait at least 10 seconds between each paste! Try again in 10 seconds." exit 1 elif [[ -z "${url}" ]]; then echo "Nothing received. Perhaps the connection failed. Please try again later." exit 1 fi echo "Your paste can be seen here: ${url}" exit 0