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.
Try the following:
use this script and do changes as per your requirement i have provided the comments and debugging code also.
In above code add the command to send yesterdays file to ETL in $yesterday case. I have considered date in ddmmyyy format please do change the filename accordingly.