#!/bin/bash SHELL_DIR=$(dirname $0) echo "change dir to $SHELL_DIR" cd "$SHELL_DIR" # Check if exactly one arguments are provided if [ $# -ne 1 ]; then echo "Usage: $0 " echo "current param count : $#" exit 1 fi # Assign the input arguments to variables MSG_TEXT="$1" echo "$MSG_TEXT" # PHXH sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=08abd6b7-67be-421b-8f9b-9bc1b2c71150" "@all" "$MSG_TEXT" # NLD委员会 sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cc0e1316-dd10-4845-b067-5693f2385f66" "@all" "$MSG_TEXT"