Created
November 27, 2012 02:24
-
-
Save heftig/4152004 to your computer and use it in GitHub Desktop.
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
filename="foobar" | |
File.open(filename, "r") do |fr| | |
File.open(filename + "~nop", "w") do |fw| | |
fr.each_line do |line| | |
fw.write line.gsub(".", "") | |
end | |
File.rename(filename + "~nop", filename) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment