filename=./文件名称.文件后缀
declare filesize=`ls -l $filename | awk '{ print $5 }'`
echo $filesize
curl 'https://oapi.dingtalk.com/robot/send?access_token=***' \
-H 'Content-Type: application/json' \
-d '{"msgtype": "text",
"text": {
"content": "测试大小:'${filesize}'字节"
}
}'
网友评论