shell脚本通过curl来post命令json请求

        用shell脚本通过curl来发送post请求,然后关键字"shell curl json"搜到文章<linux shell中curl 发送post请求json格式问题>:"json数据里变量要用''括起来",然后在shell命令行上的确如此,然后在shell脚本中也是这样。但是当将json格式的数据赋值给某个变量report_info,然后通过$report_info来发送json数据的时候就不能再加上''了。并且json需要[]来包括起来。 

猜你喜欢

转载自www.cnblogs.com/wongdu2014/p/9209199.html