Hi All,
I need to create shell script in which I need to change existing file name to another name:
suppose I have file say test_file.csv at /XXXX/XXX/XX/test_file.csv
now I want rename that test_file.csv to with another name and the logic of renaming file is like below:
suppose sysdate is 03 march 2016 i.e day is Monday then file name should be like test_file_yyyymmdd.csv but here the catch is if day is Monday then it should pick last Friday's date, so in our example new file name should be test_file_20160311.csv
if day is tue then Monday's date like test_file_20160314.csv
up to Friday, if day is Friday then Thursday's date.
thanks