Create a gist now

Instantly share code, notes, and snippets.

What would you like to do? bash alias
amn() {
if [ $# -ge 1 -a ! -f $1 ]; then
input=$(cat -)
echo $input > $temp
curl -sF "file=@$temp;filename=xyz.$1"
rm $temp
elif [ $# -ge 1 -a -f $1 ]; then
curl -sF "file=@$1"
echo "No filename provided (amn [filename])"
echo "Try:"
echo "amn [filename]"
echo "or"
echo "pbpaste | amn [filetype]"
echo "More info:"
return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment