Created
January 14, 2020 23:10
-
-
Save FrankHassanabad/bbe866cfdcd446ed000baef92c6bbfe1 to your computer and use it in GitHub Desktop.
Sorts JSON keys using 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
#!/bin/sh | |
mkdir sorted | |
for f in ~/projects/kibana/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/*.json ; do | |
echo $f | |
cat $f | jq . -S > sorted/$(basename -- "$f" .json).json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment