Skip to content

Instantly share code, notes, and snippets.

@agate
Last active April 6, 2018 18:57
Show Gist options
  • Save agate/a2663a45b2fe5e8bedc4d2a9849ea0d2 to your computer and use it in GitHub Desktop.
Save agate/a2663a45b2fe5e8bedc4d2a9849ea0d2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
while read p; do
echo $p | gron | ruby -r json -e "puts Hash[STDIN.readlines.map {|x| y = x.strip.sub(/;$/, '').split(/ = /); [y[0], JSON.parse(y[1])] }].to_json"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment