[ale] file modification time via shell script
Jim Popovitch
yahoo at jimpop.com
Fri Aug 3 15:57:02 EDT 2007
On Fri, 2007-08-03 at 15:43 -0400, Greg Freemyer wrote:
> On 8/3/07, Jim Popovitch <yahoo at jimpop.com> wrote:
> > I'v got an electronic voting machine that I need some help hacking on..
> > NOT! (but I did get your attention...) ;-)
> >
> > Here's what I am trying to do however: I need to run a script (via
> > cron) that first determines if a log file changed since the last time
> > the script ran before it does further processing. Ideas?
> >
>
> >From the top of my head, (ie. no testing even of syntax)
>
> WORK=`find <logfile> -newer /usr/local/share/my-flag-file -print`
>
> touch /usr/local/share/my-flag-file
>
> if [ $WORK == "" ]
> exit
>
> real work
>
>
> Greg
Cool, thanks Greg!
-Jim P.
More information about the Ale
mailing list