The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
grep latest file based on date. lweegp Shell Programming and Scripting 12 04-03-2009 03:10 AM
Processing a log file based on date/time input and the date/time on the log file primp Shell Programming and Scripting 4 03-16-2008 11:23 AM
Grabbing lines out of a file based on a date bsp18974 Shell Programming and Scripting 2 07-17-2006 08:58 AM
Report file extraction based on Date range ganapati Shell Programming and Scripting 2 07-13-2006 11:26 AM
File management based on date created Geehog_Rare UNIX for Dummies Questions & Answers 1 01-30-2006 04:38 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-04-2007
sureshg_sampat sureshg_sampat is offline
Registered User
  
 

Join Date: Nov 2006
Location: Czech Republic
Posts: 48
Picking the file based on Date..Requirement

Dear frnds

My requirement is as follows

-rw-r----- 1 f02 dd 109428250 May 18 14:02 Extracts_20070518104730.zip

-rw-r----- 1 f02 dd 109493187 May 21 13:30 Extracts_20070521091700.zip

-rw-r----- 1 f02 dd 109993058 May 23 14:14 Extracts_20070523085955.zip

-rw-r----- 1 f02 dd 110381316 May 25 15:03 Extracts_2007052509491

I recieve the files every alternate days i.e MOn.. Wed...Fri
Now I need a script which receives a parameter (DateSuffix) which will have default value as "AUTO"

Scenario
-------------
So when I run the script on say 21 May and DateSuffix="AUTO", the script should pick up 18 May file.

when I run the script on say 23 May and DateSuffix="AUTO", the script should pick up 21 May file and son on......

The script shud handle teh month and year changes as well.
Any inputs in this regard is appreciated

Thanks in advance
Suresh
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0