Skip to content

Instantly share code, notes, and snippets.

@Sitwon
Created April 27, 2010 01:36
Show Gist options
  • Save Sitwon/380197 to your computer and use it in GitHub Desktop.
Save Sitwon/380197 to your computer and use it in GitHub Desktop.
Simple script for pasting stuff to pastebin.com from the command line
#!/bin/bash
ADDRESS="http://pastebin.com/api_public.php"
NAME=${NAME:-$USER}
URL=$(curl -d paste_private=1 -d "paste_code=$(cat $1)" -d "paste_name=$NAME" $FORMAT $SUBDOMAIN $ADDRESS 2>/dev/null)
echo $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment