Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: OT ksh day of week yesterday

RE: OT ksh day of week yesterday

From: Rusnak, George A. (SEC-Lee) <george.rusnak_at_deca.mil>
Date: Wed, 13 Nov 2002 12:50:38 -0800
Message-ID: <F001.00502AFF.20021113125038@fatcity.com>


Barb,
Try this:

#!/bin/ksh
#
# set up arrys of day strings, offset by one from real day
#

set -A days Fri Sat Sun Mon Tues Wed Thurs
#
# determine today's day of week index
#

index=$(date '+%u')
#
# Use index to get previous days abbreviation
#

echo ${days[$index]}
#
grep STRING log.${days[$index]}  

HTH -----Original Message-----
Sent: Wednesday, November 13, 2002 2:53 PM To: Multiple recipients of list ORACLE-L

My TZ is EST5EDT and I think the 5 implies GMT-05:00 What does the 26 in EST26EDT imply?

Just curious.
Ed

-----Original Message-----
Sent: Wednesday, November 13, 2002 2:24 PM To: Multiple recipients of list ORACLE-L

yesterday=$(TZ=EST26EDT date +%a)

On Wed, 13 Nov 2002, 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
>
>
>
> ---------------------------------
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Alex
  INET: axs_at_m-net.arbornet.org

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: ListGuru_at_fatcity.com (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Sherman, Edward
  INET: shermanej_at_eccic.com

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: ListGuru_at_fatcity.com (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rusnak, George A. (SEC-Lee)
  INET: george.rusnak_at_deca.mil

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: ListGuru_at_fatcity.com (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).
Received on Wed Nov 13 2002 - 14:50:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US