#!/usr/bin/env ruby

 File.open('/etc/hosts', 'a') do |file|
   50000.times {|x| file.puts '127.0.0.1 host-fubar'}
   50000.times {|x| file.puts '::1 host-fubar'}
 end