Skip to content

Instantly share code, notes, and snippets.

@stanaka
Created February 8, 2013 12:53
Show Gist options
  • Save stanaka/4738872 to your computer and use it in GitHub Desktop.
Save stanaka/4738872 to your computer and use it in GitHub Desktop.
Simple parser for a LTSV (Labeled Tab-separated Values: http://ltsv.org) file
#!/usr/bin/env ruby
while gets
record = Hash[$_.split("\t").map{|p| p.split(":", 2)}]
p record
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment