Hi Unix and Shell script experts,
I want a script.
Every friday (20220909 for example) I am getting three file
20220909_abc.txt
20220910_abc.txt
20220911_abc.txt
with shell script I need to check this three files, get the YYYYMMDD part, and need to cross check with latest dates (today /tomorrow/next day), if they match continue else fail
20220910_abc.txt--->20220910-->next day..i.e 20220910 (which current date+1)
20220911_abc.txt--->20220911-->next day..i.e 20220911 (which current date+2)
If we got any file out of range (like older than 20220909 or greater than 20220911), need to fail. Appreciate you provide some insight on this.