Skip to content

Instantly share code, notes, and snippets.

@aergonaut
Last active December 12, 2015 08:18
Show Gist options
  • Save aergonaut/4742627 to your computer and use it in GitHub Desktop.
Save aergonaut/4742627 to your computer and use it in GitHub Desktop.
fout = File.open "outfilename", "w+"
File.open "infilename" do |fin|
fin.each do |line|
fout << line.gsub(/production.log.[0-9]+.gz-...[:-] /, "")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment