Skip to content

Instantly share code, notes, and snippets.

@heftig
Created November 27, 2012 02:24
Show Gist options
  • Save heftig/4152004 to your computer and use it in GitHub Desktop.
Save heftig/4152004 to your computer and use it in GitHub Desktop.
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