Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Get the name of the file with yesterday's date?

    Hi EverB,
    I want get the name of the file present in the particular dir path.This file gets gernerated daily.
    i hav written a script which transfer the file with todays date.But now i want to transfer the file say outputXXXX with yesterday's date.

    Thanks in Advance,

  2. #2
    Join Date
    Oct 2003
    Hi arunprasadlv,
    I know, it is a problem to get the date from yesterday or x days back under unix. We often talk about in this forum. If your problem exist only for yesterday, I have a pragmatically idea for you.

    Make an entry in your crontab like this :
    59 23 * * * date +%m%d%Y > yesterday.file

    When your script is running, read the file and you get the day information from yesterday.

    If you have furter problems to read the file and to get the right format back,
    let us known.
    Last edited by fla5do; 07-08-04 at 15:04.
    Greetings from germany
    Peter F.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts