Last active
August 7, 2023 16:38
-
-
Save mautematico/5567fb3f1cad166dbc82 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
cat posts.json | jq -c -M '.[]' | sed 's/\\"/\\\\"/g' | \ | |
while read single_post; | |
do | |
post_id=$(echo $single_post | jq '.ID'); | |
echo $single_post > post/$post_id.json; | |
done | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment