Rather than figure out the date subtraction in the command shell, when I
want yesterday's date, I cheat.

I schedule the job at 11:59 PM, then parse the date, then continue.  For
one specific job, I really wanted a log file to be finished, so I then
issued waitfor.exe and made it pause for 10 minutes... functionally, it
executed today, but on yesterday's data.

WaitFor.exe is in the usual Microsoft OS Resource Kits.

Back in the day, I used to set environment variables called TodayMM,
TodayDD, TodayYYYY and likewise for Yesterday.  I also ignored 00:00 for
any jobs, and used 23:59 or 00:01, but typically 00:01 and the Yesterday
variables.

Andrew 8)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Goran Jovanovic
Sent: Monday, March 07, 2005 7:04 PM
To: [email protected]
Subject: RE: [Declude.Virus] Weak little report on found viruses


I run this batch job every night at just before midnight. It does
everything you asked for and more :) and if you act quickly we can throw
in some steak knives.

And while I am at it does anyone have and batch code that will figure
out yesterdays date? I would love to run my report after midnight and
get yesterday's log file.

Thanx

BTW change the .txt to .cmd and some variables inside.
 
 
 
     Goran Jovanovic
     The LAN Shoppe


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:Declude.Virus- 
> [EMAIL PROTECTED] On Behalf Of Bill Landry
> Sent: Monday, March 07, 2005 6:54 PM
> To: [email protected]
> Subject: Re: [Declude.Virus] Weak little report on found viruses
> 
> grep INFECTED vir0307.log | cut -d " " -f 7- | usort | uniq -c | usort
> 
> Bill
> ----- Original Message -----
> From: "Colbeck, Andrew" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, March 07, 2005 12:50 PM
> Subject: [Declude.Virus] Weak little report on found viruses
> 
> 
> On another list there was a request for a simple quick way (and free?)

> to find out how many viruses Declude Virus has caught.
> 
> This will do the trick, but of course it depends on what you're
*really*
> after:
> 
> gawk "$4 ~ /Scanner/" vir0307.log
> 
> Awk will then check column 4 in the file for a regular expression that

> matches "Scanner" and output the whole line.
> 
> You could count the lines in Awk and output the total, but then that 
> would probably require a little bit more than you want to learn, so
just
> tack on an easy utility to do that total for you:
> 
> gawk "$4 ~ /Scanner/" vir0307.log | wc -l
> 
> Andrew 8)
> 
> p.s. On my system, I mostly see NetSky, then MyDoom, then IFrame 
> exploits.
> ---
> [This E-mail was scanned for viruses by Declude Virus 
> (http://www.declude.com)]
> 
> ---
> This E-mail came from the Declude.Virus mailing list.  To unsubscribe,

> just send an E-mail to [EMAIL PROTECTED], and
> type "unsubscribe Declude.Virus".    The archives can be found
> at http://www.mail-archive.com.
> 
> ---
> [This E-mail was scanned for viruses by Declude Virus 
> (http://www.declude.com)]
> 
> ---
> This E-mail came from the Declude.Virus mailing list.  To unsubscribe,

> just send an E-mail to [EMAIL PROTECTED], and
> type "unsubscribe Declude.Virus".    The archives can be found
> at http://www.mail-archive.com.
---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.Virus mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.Virus".    The archives can be found
at http://www.mail-archive.com.

Reply via email to