#!/bin/bash file="$1" if [ "$file" == "" ]; then file=- fi sed '1s/^/content=/' "$file" \ | curl -w '%{redirect_url}\n' \ -X POST -H "Content-Type: text/plain; charset=UTF-8" \ --data-binary @- http://paste.devys.org/