On Monday 10 March 2003 13:51 pm, you wrote:

> I have configured analog to take in the log files in such format from the
> cnf file
> 
> LOGFILE /var/tmp/logs/*[0-9]/*[0-9]/*[0-9]
> 
> this setup takes in all log files.

...
> is there any regular expression syntax for only getting the last logfile
> (aka the one with the greatest number)

You can specify logfile on command-line with +C"LOGFILE filename".
So you can write a shell script and use find, awk, etc. to get the
correct filename, and then call analog.

Something like 
  find /var/tmp/logs -name "*[0-9]" -print | \
  awk 'BEGIN { FS="/" } { print $5 $6 $7 }' | \
  sort -n
will print the file with greatest number last (warning: this is off
the top of my head and is probably not entirely correct).

Dima
-- 
... with the exception of January and February 1900, all Microsoft application
libraries counted dates the same way.  
                            -- An Interview with Joel Spolsky of 
JoelonSoftware
+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  Digest version: http://lists.isite.net/listgate/analog-help-digest/
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
+------------------------------------------------------------------------

Reply via email to