在Bash脚本中解析GitHub的JSON

时间:2016-05-24 22:55:50

标签: json bash

有没有办法解析JSON而不使用其他依赖项,例如jq。例如,给定时:

{
  "id": 1,
  "tag_name": "v1.0.0",
  "target_commitish": "master",
  "name": "v1.0.0",
  "body": "Description of the release",
  "draft": false,
  "prerelease": false,
  "created_at": "2013-02-27T19:35:32Z",
  "published_at": "2013-02-27T19:35:32Z"
}

如何过滤掉只能在bash中获取namebody的内容?

提前致谢

0 个答案:

没有答案