curl命令+jq抓取json数据

jq使用文档:http://stedolan.github.io/jq/manual/

举例:

{"name": "han","age": "20"}

 

curl -s -d 'user=aa&pass=cc' http://www.example.com | jq '.name' >> file.txt

cat file.txt

han

posted @ 2015-01-27 09:28  i-think  阅读(2004)  评论(0编辑  收藏  举报