使用shell生成七牛的管理凭证并进行刷新
#!/usr/bin/env bash
if [ $# -lt 5 ]
then
echo"参数错误 参数格式 AK SK URL body 1 or 2"
exit 1
fi
PATHSS=$(echo $3 | cut -d/ -f4-)
PATHS="/"${PATHSS}"\n"
auth=$(echo -en $PATHS | openssl sha1 -hmac $2 -binary | base64 | tr "+/" "-_")
AUTHRON=$1":"${auth}
echo $AUTHRON
function HTTPPODST(){
au=$1
echo$au