Skip to content

Instantly share code, notes, and snippets.

@dkubb
Created November 19, 2010 15:55
Show Gist options
  • Save dkubb/706679 to your computer and use it in GitHub Desktop.
Save dkubb/706679 to your computer and use it in GitHub Desktop.
Sends an email to an address when a log is written to
tail -0f test.log | ruby -ne 'open("|mailx -s Log dan.kubb@gmail.com", "w", &:print)'
@dkubb
Copy link
Author

dkubb commented Nov 19, 2010

I'll post an explanation of what this is doing shortly. It may look simple, but there are actually a few subtle things going on here that are not immediately clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment