Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix date ??
Here is one way to do this:
#!/usr/bin/ksh
THISMM=`date +%m`
LASTMM=`expr $THISMM - 1`
if [ $LASTMM -eq 0 ]
then
LASTMM=12
fi
echo "This month " $THISMM
echo "Last month " $LASTMM
HTH, Regards,
> -----Original Message-----
> From: Sinardy [SMTP:sinardyxing_at_bcsis.com]
> Sent: Monday, July 30, 2001 6:16 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Unix date ??
>
> Hi all,
>
> Unix...
> My boss ask me to write script for house keeping last month files
>
> what is the parameter to get system last month ?
> for example:
>
> thismonth=`date ....
>
> thismonth = thismonth - 1 is not working...
>
>
> regards,
>
> Sinardy
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Sinardy
> INET: sinardyxing_at_bcsis.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> 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: Deshpande, Kirti INET: kirti.deshpande_at_verizon.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- 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 Mon Jul 30 2001 - 07:46:26 CDT
![]() |
![]() |