-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
With GNU Sed for example you can edit files in place:
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
However I see no option for this with JQ, currently I must do this:
br=$(mktemp)
jq .charlie delta.json > "$br"
mv "$br" delta.jsonHere is a workaround, Awk slurp:
jq .firstName alfa.json | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' alfa.jsonReactions are currently unavailable