Skip to content

Instantly share code, notes, and snippets.

@timothyekl
Created July 11, 2011 15:11
Show Gist options
  • Save timothyekl/1076054 to your computer and use it in GitHub Desktop.
Save timothyekl/1076054 to your computer and use it in GitHub Desktop.
Read from stdin, converting to MySQL 'values' tuples
while line = $stdin.gets
puts "(" + line.split.map {|i| "'#{i}'"}.join(',') + "),"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment