我有这些curl命令
1。
curl -XPUT "http://192.168.1.1:8080/locate" -d' { "crap": { "crazy": 1 }, "asap": { "peg": { "properties": { "url": { "type": "string", "index": "no" } } } } }'
2。
curl -XPOST "http://192.168.1.1:8080/locate" -d' { "url": "https://cdn.happyworld.com/lmfao" }'
我如何在one line curl命令中编写它们中的每一个,以便我可以轻松地将每一行放在bash脚本的一行中?
如果一行是不可能的,那么我怎样才能把它们格式化,让bash能够理解为一个命令呢?
谢谢!!!
伟大的事情是我只是去积极的模式,并解决它自己
1。
curl -XPUT "http://192.168.1.1:8080/locate" -d'{"crap": {"crazy": 1},"asap": {"peg": {"properties": {"url": {"type": "string","index": "no"}}}}}'
2。
curl -XPOST "http://192.168.1.1:8080/locate" -d'{"url":"https://cdn.happyworld.com/lmfao"}'