Last active
August 29, 2015 14:24
-
-
Save gimntut/884f930361dbab0f2aab 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
echo "[" > begin.txt | |
echo "{}]" > end.txt | |
sed -rn "s=\"=\\\"=p" aneks.sql >aneks2.txt | |
sed -rn "s=.*\`anek\`.*\(([0-9]+), ([0-9]+), '(.*)'.*={\"id\":\"\1\", \"category\":\"\2\", \"text\":\"\3\", \"collections\":[{\"id\":\"anekdot\"}]},=p" aneks2.txt > 0.txt | |
cat begin.txt 0.txt end.txt >anekdots.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment