I don't think you'll be able to do this since the mail command won't
ever send the message until its STDIN is closed. Since you're using
tail -f, the STDIN for the mail command will never be closed and you'll
never get a message. When I've done similar things in the past, specifically for the alert log, I've done something like: 1. mv alert.log alert.log.YYYYMMDDHH24MM 2. grep "whatever error strings" alert.log.YYYYMMDDHH24MM | mail ... 3. find alert.log.* -mtime +10 | xargs rm and re-run that every process at regular intervals (daily, hourly, whatever). For other logfiles that aren't easily "rolled" like that, you may need to find a way to close them to rotate them and/or include the rotation process in the same script where you check the contents for errors. I'm sure there are more elegant solutions, but this (or something like it) has worked well for me in the past. Dan Shivaswamy / ಶಿವಸ್ವಾಮಿ wrote: -- //www.freelists.org/webpage/oracle-l |