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 > FIND my time....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-16-03, 22:17
playernovis playernovis is offline
Registered User
 
Join Date: Nov 2002
Location: San Francisco
Posts: 251
FIND my time....

I'm pretty new in UNIX.....


I receive a file every night, the file is in format myfileYYYYMMDD_HHMM The problem is that the file sometimes arrives before midnight, so it has different date, how can I FIND files between let's say 11pm and 6am?

I was thinking about FIND command, but FIND command has all parameters in days.... (I use SUN and KORN).

thanks


jiri

Last edited by playernovis; 06-16-03 at 22:26.
Reply With Quote
  #2 (permalink)  
Old 07-03-03, 11:31
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool

No need to 'find' the time if you follow this procedure:

1) File is received in filein directory.
2) Process any file in filein, whith the specified format.
3) Move processed file to files_processed directory.

This way any file found in filein directory you know it is not processed! -- therefore no need to check for any 'time'.

Last edited by LKBrwn_DBA; 07-03-03 at 11:34.
Reply With Quote
  #3 (permalink)  
Old 07-04-03, 06:07
sypher sypher is offline
Registered User
 
Join Date: Jan 2003
Location: Scotland
Posts: 17
Quote:
Originally posted by LKBrwn_DBA
No need to 'find' the time if you follow this procedure:

1) File is received in filein directory.
2) Process any file in filein, whith the specified format.
3) Move processed file to files_processed directory.

This way any file found in filein directory you know it is not processed! -- therefore no need to check for any 'time'.
You could pattern match in perl, sed.
Reply With Quote
  #4 (permalink)  
Old 07-09-03, 18:58
aruneeshsalhotr aruneeshsalhotr is offline
Registered User
 
Join Date: Jul 2003
Location: US
Posts: 314
Lightbulb files received

Since this would be a very simple operation and u dont need to go for complex solutions like perl or something, simply use awk and you should be fine.
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