-
-
Save toothrot/116213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locations = { | |
:name1 => "\\\\192.168.2.101\\e$\\gw.log", | |
:name2 => "\\\\192.168.2.101\\e$\\cima.log", | |
:name3 => "\\\\is-util02\\c$\\eba.log", | |
:name4 => "\\\\192.168.2.30\\c$\\DATA\\USERCOPYLOG.LOG", | |
:name5 => "\\\\192.168.2.30\\c$\\DATA\\PSTS.LOG", | |
:name6 => "\\\\192.168.2.105\\c$\\Program Files\\Windows Resource Kits\\Tools\\RC.log", | |
:name7 => "\\\\192.168.2.105\\c$\\Program Files\\Windows Resource Kits\\Tools\\RC2.log", | |
:name8 => "\\\\192.168.100.96\\f$\\QBROBOCOPY.LOG", | |
:name9 => "\\\\192.168.2.114\\c$\\RC2.LOG", | |
:name10 => "\\\\192.168.2.114\\c$\\RC.LOG" } | |
locations.each_pair do |client_name, location| | |
command = %Q[tail "#{location}"] | |
puts "======================================================================" | |
puts "x #{client_name}" | |
puts "x #{command}" | |
puts "======================================================================" | |
IO.popen(command) do |io| | |
io.each_line { |line| puts line } | |
end | |
end | |
%x[pause] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment