Hi all,
I have a file of the following format -
EXPRPT:SCN:1.1706E+10:SEQ_START:121652:SEQ_END:121664:0
( This file name is variable and changes daily)
Now in the same directory I have another set of files of the format -
EXPRPT.log.0001.0000121669
Now what I am trying to do is to
- Parse the first file name and Get the number 121652 from the first file and then DELETE all the files of type EXPRPT.log.* where 6-7 digits of EXPRPT.log.* are lesser than number extracted from first file.
For example -
Let us say the following files are there -
EXPRPT.log.0001.0000121649
EXPRPT.log.0001.0000121651
EXPRPT.log.0001.0000121669
EXPRPT.log.0001.0000121670
Then only following files should be deleted as number 121652 is higher than numbers in these files.
EXPRPT.log.0001.0000121649
EXPRPT.log.0001.0000121651
Thanks for all your help.
Regards