set -o pipefail
The jq tool is amazing, but it won’t change an existing file in-place. Here’s a hack using ex to get around that:
jq
ex
jq ... input.json | ex -sc 'wq!input.json' /dev/stdin
More info on ex
Date: 2016-08-10
Tags: json
Share: