Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment