Skip to content

Instantly share code, notes, and snippets.

@svladcjelli
Forked from toothrot/TAILROBOCOPYLOGS.rb
Created May 22, 2009 16:05
Show Gist options
  • Save svladcjelli/116217 to your computer and use it in GitHub Desktop.
Save svladcjelli/116217 to your computer and use it in GitHub Desktop.
locations = {
:Goodman => ["\\\\192.168.2.101\\e$\\gw.log"],
:CIMA => ["\\\\192.168.2.101\\e$\\cima.log"],
:Edgewater => ["\\\\is-util02\\c$\\eba.log"],
:Viscosity => ["\\\\192.168.2.30\\c$\\DATA\\USERCOPYLOG.LOG",
"\\\\192.168.2.30\\c$\\DATA\\PSTS.LOG"],
:SSR => ["\\\\192.168.2.105\\c$\\Program Files\\Windows Resource Kits\\Tools\\RC.log",
"\\\\192.168.2.105\\c$\\Program Files\\Windows Resource Kits\\Tools\\RC2.log"],
:POC => ["\\\\192.168.100.96\\f$\\QBROBOCOPY.LOG"],
:AGDG => ["\\\\192.168.2.114\\c$\\RC2.LOG",
"\\\\192.168.2.114\\c$\\RC.LOG"]
}
locations.each_pair do |client_name, log_file|
command = %Q[tail -11 "#{log_file.join('" "')}"]
puts "======================================================================"
puts "x #{client_name}"
puts "x #{log_file}"
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