标签:shell
#!/bin/bash ################## # # author: will # createdate: 20170314 # function: # ################## a=$1 b=$2 china() { ####visachina告警 CropID=‘xxxx‘ Secret=‘xxxx‘ topartyID=2 agentidID=1 text=`cat $b` ###获取token token=`curl -s https://qyapi.weixin.qq.com/cgi-bin/gettoken?co"rpid=${CropID}&corpsecret=${Secret}" | awk -F ‘\"‘ ‘{print $4}‘` ###发送消息 curl -d ‘{"toparty":"‘${topartyID}‘","agentid":"‘${agentidID}‘","msgtype":"text","text":{"content":"‘"${text}"‘"}}‘ https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token="${token}" } $a
本文出自 “zengs” 博客,请务必保留此出处http://zengs.blog.51cto.com/939838/1907150
标签:shell
原文地址:http://zengs.blog.51cto.com/939838/1907150