*BSD News Article 34401


Return to BSD News archive

Xref: sserve comp.unix.bsd:14571 comp.unix.misc:13488 comp.unix.programmer:19236 comp.unix.questions:53612
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!cs.utexas.edu!not-for-mail
From: pzuge@worf.uwsp.edu (Peter Zuge)
Newsgroups: comp.unix.bsd,comp.unix.misc,comp.unix.programmer,comp.unix.questions
Subject: Q:  How can I get yesterday's date?
Date: 16 Aug 1994 03:13:01 -0500
Organization: UTexas Mail-to-News Gateway
Lines: 23
Sender: nobody@cs.utexas.edu
Message-ID: <Pine.3.89.9408160216.A15886-0100000@worf.uwsp.edu>
NNTP-Posting-Host: news.cs.utexas.edu

I am using BSD/386 unix:

I need to create a script that will run at a certain time everyday 
"getting" ( via ftp ) a file with yesterday's date.

I have the script working except for one detail; "getting" the file using 
the actual name.  The name of the file uses the date for its name
( format:  GS940815.LOG  or "GS" + yy + mm + dd + ".LOG" ).

Question:  How can I get the date just previous to today, and put it into 
           the correct format I need?

Many Thanks in Advance.
                               <<<<
                             o(0-0)o
         ------------------ooO-(_)-Ooo------------
              Peter A. Zuge   Gopher Administrator
              U of Wisconsin, Stevens Point 
              Information Technology                   
         -----------------------------------------
              Gopher:  gopher.uwsp.edu     
              e-mail:  pzuge@worf.uwsp.edu