Last active
September 26, 2018 11:25
-
-
Save rollxx/7e246834d139f6ef5bd2027326a29647 to your computer and use it in GitHub Desktop.
iterate over json files
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
#!/usr/bin/env bash | |
for tenant in $(seq 1 12); do | |
input=sitemap-${tenant}.json | |
for i in $(seq 0 $(expr $(jq length ${input}) - 1 )); do | |
jq ".[$i]" -r ${input} > sitemap-${tenant}-${i}.json | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment