Barbara Baker wrote: > > Will someone take pity on this poor VMS'er lost in a unix world?? > > I'm trying to create a script (ksh) that reads a log file created > yesterday. The log files are created with `date +%a` appended to the > end of the log file name. Last night a log file was created called > arc_indexlog.Tue It's easy enough to get today > > TDAY="`date +%a`" > grep -i "ora" /orasrv/ops/maint/logs/arc_indexlog.$TDAY > grep -i "ora" /orasrv/ops/maint/logs/adv_indexlog.$TDAY > > but how do I get yesterday in the same format? (i.e., Tue instead of > Wed) I man'd date, but it was no help. > > Thanks for any help. > > Barb
One of my nightmares. If you have only one file a day, I'd rather do it with 'find', the suitable pattern for the filename and something like -ctime. Another way to do it is to get the date from Oracle ... HTH, Stephane Faroult Oriole Software -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroult INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
