Skip to content

Instantly share code, notes, and snippets.

@dirkgr
Created November 23, 2015 19:36
Show Gist options
  • Save dirkgr/445a880c51122ea79a24 to your computer and use it in GitHub Desktop.
Save dirkgr/445a880c51122ea79a24 to your computer and use it in GitHub Desktop.
In a JSON file with run-together brackets ("}{"), this inserts newlines between them, so you have one JSON expression on one line.
perl -pe 'BEGIN{ $/="}{" } s/}{/}\n{/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment