Created
May 13, 2022 13:27
-
-
Save polyglothacker/ef8a84e34f0fb4b41878ca46fb237649 to your computer and use it in GitHub Desktop.
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
# Shell commands to add "x" values | |
$ $ cat alerts.json | grep "x" | sed 's/"x"://g' | awk '{sum += $NF} END {print sum}' | |
50237 | |
$ cat alerts.json | grep "x" | sed 's/,//g' | awk -F ":" '{sum += $NF} END {print sum}' | |
50237 | |
$ cat alerts.json | grep "x" | cut -d ":" -f 2 | awk '{ sum += $0} END {print sum}' | |
50237 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment