Skip to content

Instantly share code, notes, and snippets.

@grosser
Created July 4, 2012 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grosser/3045258 to your computer and use it in GitHub Desktop.
Save grosser/3045258 to your computer and use it in GitHub Desktop.
Dir["tmp/*.txt"].each do |ip_file|
puts "-" * 50
puts ip_file
ip = File.basename(ip_file).sub('.txt','')
puts "ip #{ip}"
puts "result:"
puts `cat #{ip_file} | ruby script/patch_dns #{ip}`
raise unless $?.success?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment