Created
March 22, 2013 01:19
-
-
Save ruedesign/5218241 to your computer and use it in GitHub Desktop.
Space to comma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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