I have a requirement of creating a script to validate the filename. There will be two files in the source from where Informatica job start picking up these files. One will be 'In progress File (Current day : Sysdate)' and the other will be Completed/ Closed File (previous day : i.e. with a file name aligned to Sysdate -1). Now ETL has to pick up all the files except In progress File ( File date is less than Sysdate). Assuming current day is “22/06/2015” – the following is the list of files that ETL can expect to see in the source folder
filename_22/06/2015_ready.csv – this file should be ignored filename_21/06/2015_ready.csv – this file should be processed by ETL
Please help me how I can write the shell script to fulfill this requirement.
You should better use
findinstead of regular expressions reading the filename.Commands like these should give you the files written the day before: