Well, the shell script was just an off-the-cuff suggestions. But I see no reason why it wouldn't work. Did you put it all on one line or make sure the include the '\' to tell your shell that the line continues?
I also don't know what shell you are using, but I tested this on bash. Finally, it's possible that Solaris's date command doesn't support the relative dates or formats in the same way. Check 'man date' for details. -- Jeremy Wadsack Wadsack-Allen Digital Group SUSANA PUMAR PAVON ([EMAIL PROTECTED]): > I tried to run Analog with your shell script but unfortunately it > doesn't work. It only reads the logs from today. Any suggestion? > -----Mensaje original----- > De: Jeremy Wadsack [mailto:[EMAIL PROTECTED]] > Enviado el: lunes, 25 de marzo de 2002 16:24 > Para: [EMAIL PROTECTED] > Asunto: Re: [analog-help] Automating analog > SUSANA PUMAR PAVON ([EMAIL PROTECTED]): >> What I'd like to do is to get information from the logs of the last >> seven days. The way I try to do that is as follows: >> FROM -00-00-07 >> TO -00-00-01 >> LOGFILE /log/http/iobox.com/access.log-%Y-%M* >> The problem is that Analog reads all the log files of the current > month, >> although it only gets the information from those of the last seven > days, >> so it goes slower. There is another problem at the begining of the >> month, because it won't read the log files of the last seven days, > only >> those that belong to this month. >> If I don't write %M in the LOGFILE sentence it runs too slow. >> Could you please help me? > You will need to write a shell script to feed Analog the last seven > days' log files from the command line. Analog has no ability to figure > this out within its command structure. > Depending on your version of 'date' you may be able to use something > like this: > ./analog \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-1 day'` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-2 days'` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-3 days'` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-4 days'` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-5 days'` \ > /log/http/iobox.com/access.log-`date +%Y-%m-%d -d '-6 days'` +------------------------------------------------------------------------ | This is the analog-help mailing list. To unsubscribe from this | mailing list, go to | http://lists.isite.net/listgate/analog-help/unsubscribe.html | | List archives are available at | http://www.mail-archive.com/[email protected]/ | http://lists.isite.net/listgate/analog-help/archives/ | http://www.tallylist.com/archives/index.cfm/mlist.7 +------------------------------------------------------------------------
