Created
April 13, 2020 11:19
-
-
Save symbiont-eric-torreborre/279f73cb8741b2149c6ed390e433008a to your computer and use it in GitHub Desktop.
update snapshot files with jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove publish payloads for versions 1-5 | |
for i in {1..5}; do cat $i.json | jq -c '.channelActionAndSequencedTransaction |= map(select(.[1].contents[4].tag != "Publish"))' | jq --indent 4 . > $i-x.json; rm $i.json; mv $i-x.json $i.json; done | |
# remove publish payloads for version 6 | |
for i in {6..6}; do cat $i.json | jq -c '.channelActionAndSequencedTransaction |= map(select(.[2][4].tag != "Publish"))' | jq --indent 4 . > $i-x.json; rm $i.json; mv $i-x.json $i.json; done | |
# remove publish payloads for versions 7-8 | |
for i in {7..8}; do cat $i.json | jq -c '.channelActionAndSequencedTransaction |= map(select(.[2].wcaChannelAction.tag? != "Publish"))' | jq --indent 4 . > $i-x.json; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment