PDA

View Full Version : FIND my time....


playernovis
06-16-03, 23:17
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

LKBrwn_DBA
07-03-03, 12:31
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'.

sypher
07-04-03, 07:07
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.

aruneeshsalhotr
07-09-03, 19:58
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.