git-subtree-dir: RubyFun git-subtree-mainline: a04a5027875fe2e51a5a08dc7aed05e3e06284b1 git-subtree-split: b01c6826131196ba58b5288a3182f2526c89c249
9 lines
289 B
Ruby
9 lines
289 B
Ruby
# read file and write to archive
|
|
File.open("archive.log", "a") do |saved|
|
|
File.foreach("mylogfile.log") do |sending|
|
|
puts("data = #{sending}")
|
|
# Make sure we keep a backup
|
|
saved.puts(sending) # removed superfluous string interpolation
|
|
end
|
|
end
|