Skip to content

Instantly share code, notes, and snippets.

@ruedesign
Created March 22, 2013 01:19
Show Gist options
  • Save ruedesign/5218241 to your computer and use it in GitHub Desktop.
Save ruedesign/5218241 to your computer and use it in GitHub Desktop.
Space to comma
line = ""
f1 = open(ARGV[0])
f2 = open(ARGV[0] + ".csv", "w")
f1.gets
f1.gets
while l = f1.gets
if l != ""
l.gsub!(/\s+/, ",")
f2.puts l
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment