Skip to content

Instantly share code, notes, and snippets.

@46bit
Created September 22, 2011 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 46bit/1234608 to your computer and use it in GitHub Desktop.
Save 46bit/1234608 to your computer and use it in GitHub Desktop.
TG: my old helper, not very nice
name=$1
#random=$RANDOM + $RANDOM + $RANDOM
md5name=`md5 -s "${name}" | grep -o "[a-z0-9]\{32\}"`
md5name="${md5name}.png"
echo "http://r.46bit.com/${md5name}"
scp "$name" user@server:"/path/to/destination/${md5name}"
#echo "http://host/${md5name}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment