On Mon, May 11, 2009 at 12:07:18PM -0400, Barclay, Daniel wrote: > Boyd Stephen Smith Jr. wrote: > > In <4a01ac7b.4010...@fgm.com>, Barclay, Daniel wrote: > >> Does Debian have any utility to address the following situation? > > > > Not that I know of. > > > >> I have some scripts that I run both manually and as cron jobs. The > >> scripts generate stdout/stderr output reporting what they're doing. > >> [snip]
> > >> I started to write a wrapper script to take a command to execute and a > >> file of regular expressions defining expected output lines ... > ... > > If you can't / won't fix your scripts, Here's a start on that wrapper: > > Yes, I have a start. I have a script that checks for ppp session outages through syslog, I only want to be notified of changes, i save output and then diff it with new output. You could use something similiar, have a template of what you don't want and filter it out, basically you need to post process your output #!/bin/bash OLDF="/var/tmp/pppsession.old" NEWF="/var/tmp/pppsession.new" [ ! -e "$OLDF" ] && > "$OLDF" egrep "sydrt.. *ppp.*Connect.time" /var/log/syslog{.1,} > "$NEWF" if ! diff "$OLDF" "$NEWF" then echo "-----------" mv "$NEWF" "$OLDF" cat "$OLDF" fi exit 0 > > > > Daniel
signature.asc
Description: Digital signature