Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mitsuhirookuno/36d4af0f3129ca90fbc893577fed8119 to your computer and use it in GitHub Desktop.
Save mitsuhirookuno/36d4af0f3129ca90fbc893577fed8119 to your computer and use it in GitHub Desktop.
one liner
tail -f hoge.log | ruby -ne '$_.match(/(tracking_id)":"([^"]+)/) {|m| p "#{m[1]} => #{m[2]}" }'
@mitsuhirookuno
Copy link
Author

ruby -ne '$_.match(/(tracking_id)":"([^"]+).*(user_agent)":"([^"]+)/) {|m| puts "#{m[1]}=#{m[2]}, #{m[3]}=#{m[4]}" }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment