Daily we receive multiple files (i.e, 0839_ls2_cdr.dat, 0839_ls2_con.dat, 0839_ls2_ddr.dat , etc). Each file contains a previous working day date in second row , first column.
I want to validate all these files contains previous business working day or not before loading them in database.
If any file does not contains previous date and received should through message. As "incorrect date file".
Date format is : yyyymmdd
Could someone please help me out to solve this using shell script.