Last active
November 4, 2017 09:52
-
-
Save fungiboletus/006eae539739a5bb3542fec285a2c87d to your computer and use it in GitHub Desktop.
CouchDB _all_docs to JSON Lines
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
cat input_file.json | sed 's/^M$//' | tail -n "+2" | head -n "-1" | sed 's/},*\r*$//' | sed 's/^.*doc"://' | grep -v '^{"_id":"_design/' > output_file.json | |
# I like useless cats, it looks cleaner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment