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: Unix shell Question

RE: Unix shell Question

From: Sakthi , Raj <rajan_sakthi_at_yahoo.com>
Date: Tue, 05 Mar 2002 14:18:23 -0800
Message-ID: <F001.004200D3.20020305141823@fatcity.com>


Hi ,
This is from one post in other shell group .. I forgot who is the poster.

#! /bin/sh

	year=`date +%Y`
	month=`date +%m`
	day=`date +%d`


# figure out what yesterday was.
day=`expr "$day" - 1` case "$day" in 0) month=`expr "$month" - 1` case "$month" in 0) month=12 year=`expr "$year" - 1` ;; esac
# figure out the last day of the month
# day=`cal $month $year | grep . | fmt -1 | tail -1`

    :$(cal $month $year)
    day = $_
    ;;

        esac

        echo "$year$month$day"



Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Sakthi , Raj
  INET: rajan_sakthi_at_yahoo.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 Tue Mar 05 2002 - 16:18:23 CST

Original text of this message

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