Skip to content

Instantly share code, notes, and snippets.

@orimanabu
Created December 4, 2010 21:34
Show Gist options
  • Save orimanabu/728498 to your computer and use it in GitHub Desktop.
Save orimanabu/728498 to your computer and use it in GitHub Desktop.
"tail -f" in ruby
#!/usr/local/bin/ruby
f = open(ARGV[0])
while true
if (line = f.gets)
puts line
else
sleep 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment