0
我想将通知发送到使用以下传入网络挂接松弛的通道是我对于如何使用在Linux bash脚本懈怠丰富的格式
# !/bin/sh
curl -X POST --data-urlencode 'payload={"channel": "#aws_webhooks", "username": "webhookbot",
"attachments":[
{
"fallback":"blahb",
"pretext":"blahblahblahblahbla",
"color":"warning",
"fields":[
{
"title":"Alarms Updates",
"value":" blahblahblahblahblahblah",
"short":false
}
]
}
]
}'
https://hooks.slack.com/services/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
bash脚本运行此脚本我面对后这个错误,有人可以帮助我在我写作脚本做错了什么
sh new.sh
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
您需要在您的有效负荷的末端反斜杠,之前'https'。此外,删除第一行'#'后的空格(尽管这不是你问题的原因)。 – codeforester
仍然无法使用 –