#!/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" sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3c92758c-1128-4931-ac8d-f19669d7befe" "@all" "$MSG_TEXT"