Skip to content

Instantly share code, notes, and snippets.

@maliabadi
Created January 17, 2014 23:04
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 maliabadi/8483341 to your computer and use it in GitHub Desktop.
Save maliabadi/8483341 to your computer and use it in GitHub Desktop.
script to tail robut log files. e.g 'ruby htail.rb http://minizord.corp.avvo.com/deploy_log/cloud_deploy_bugfix_11_15.log'
require 'open-uri'
printed = 0
begin
open(ARGV[0]) do |file|
`clear`
index = 0
file.each_line do |line|
if index > printed
print line
printed += 1
end
index += 1
end
end # end begin
sleep 1
end while true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment