Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g2LLEV520061
 for <oracle-l@naude.co.za>; Thu, 21 Mar 2002 16:14:31 -0500
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id NAA83950;
 Thu, 21 Mar 2002 13:14:29 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b70/bab) via UUCP id 00430306; Thu, 21 Mar 2002 12:39:12 -0800
Message-ID: <F001.00430306.20020321123912@fatcity.com>
Date: Thu, 21 Mar 2002 12:39:12 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Koivu, Lisa" <lisa.koivu@efairfield.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Koivu, Lisa" <lisa.koivu@efairfield.com>
Subject: RE: Sightly OT: Unix scripting
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 70; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Terry, 

I don't see a format like that in the unix date command formats,
unfortunately.  You may have to test the value and pad the number yourself.
I have to do that in a number of my perl scripts.  

You are lucky you have Unix...

Lisa Koivu
Oracle Database Monkey.
Fairfield Resorts, Inc.
954-935-4117


> -----Original Message-----
> From:	Ball, Terry [SMTP:TBall@birch.com]
> Sent:	Thursday, March 21, 2002 2:08 PM
> To:	Multiple recipients of list ORACLE-L
> Subject:	Sightly OT: Unix scripting
> 
> Environment:  Oracle 8.1.6.3 on Solaris 5.8
> 
> I am not a Unix Guru by any strech of the imagination, so I can use all
> the
> help I can get.  I am trying to write a shell script to execute sqlldr of
> a
> file whose name includes yesterday's 2 digit year and julian day in the
> format: file_yyjjj.csv.  I can get today's date fine by setting a variable
> to be DATE=`date '+%y%j'`
> 
> But when I try to get DATE -1 it strips the leading 0 (since it is
> currently
> 02).  Does anyone have any suggestions as to how I can retain the leading
> 0
> and still get yesterday's date?
> 
> TIA,
> 
> Terry
> 
> Terry Ball, DBA
> Birch Telecom
> Work: 816-300-1335
> FAX:  816-300-1801
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Ball, Terry
>   INET: TBall@birch.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@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: Koivu, Lisa
  INET: lisa.koivu@efairfield.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@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).

