If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Get the name of the file with yesterday's date?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-04-04, 00:53
arunprasadlv arunprasadlv is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 41
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,
Arun
Reply With Quote
  #2 (permalink)  
Old 07-08-04, 14:01
fla5do fla5do is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 138
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.
__________________
Greetings from germany
Peter F.

Last edited by fla5do; 07-08-04 at 14:04.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On