f = File.open("/tmp/test.conf", "a+")
f.each_line do |line|
puts line.gsub!(/\/(.*)/, "99999")
end
f.close
File.open("/tmp/test.conf", "r") do |in|
File.open("/tmp/tmp_test.conf", "w") do |out|
in.each_line { |line| out.puts line.gsub(/\/(.*)/, "99999") }
end
end