【发布时间】:2014-05-15 11:36:03
【问题描述】:
我正在编写一个 shell 脚本,它在最后运行一个 curl 命令发布一个 json 数据。这个数据太长,运行脚本时,它无法运行完整的命令!我试图拆分行,但在 json 数据中出现错误!
注意:我使用的是嵌入式 linux
【问题讨论】:
-
显示 curl 命令。
-
curl xxxxxxxx --header 'Content-Type:application/json' --data '{"xxx":"'"$xxx"'","xxx":"'"$ xxx"'","xxx":"'"$xxx"'","xxx":"'"$xxx"'","xxxx":"'"$xxx"'","xxx":"' "$xxxx"'","xxxx":{"xxxx":"'"$xxx"'","xxx":"'"$xxx"'","xxxx":"'"$xxx"'" ,"xxx":"'"$xxx"'","xxx":"'"$xxxx"'","xxx":"'"$xxx"'", "xxxx":"'"$xxx" '","xxx":"'"$xxx"'"}'
标签: shell split command-line-arguments