Search the archive of this list. This has been discussed before.
You can use a trick such as this:
yesterday=$(TZ=EST26EDT date +%a)
but beaware that this is not a portable solution. You can write
your own script. E-mail me off line and I can send you mine yesterday
script.
-----Original Message-----
Sent: Monday, December 23, 2002 12:09 AM
To: Multiple recipients of list ORACLE-L
Not easily done in Unix. However, if you've got an Oracle db running on the
same server you might want to get yesterday's date from Oracle (within a
shell script).
...
...
YESTERDAY=`sqlplus -s / <<-EOF
set head off feed off pages 0
select trunc(sysdate - 1) from dual;
exit
EOF`
echo "YESTERDAY is $YESTERDAY"
...
...
hth,
Ross
-----Original Message-----
Sent: Saturday, 21 December 2002 7:51
To: Multiple recipients of list ORACLE-L
Hi All,
I want to get previous date from today's date.Is there any cmd for
this.
Thanks
Manoj
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author:
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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Ross Collado
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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Richard Ji
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).