I want to have my server send me an email every time someone accesses a PDF file on my webserver.
tail -f /var/log/apache.log | grep pdf > ??something??
How would I generate a new email message each time this tail/grep outputs something? How could I have that running as a background script?