curl 在zsh与bash上-d不同表现
curl -H 'Content-Type: application/json' -d "{\"msgtype\": \"text\",\"text\": {\"content\": \"$ {msg}\"}}" $ding
这段代码目的是使消息体可以控制,用变量代替,zsh bash运行均完好
curl -H 'Content-Type: application/json' -d '{"msgtype": "text","text": {"content": "'${msg}'"}}' $ding
单引号
原创
2020-09-03 23:36:00 ·
406 阅读 ·
0 评论