i want to write a unix script where:
source dir:/test1/jobs/def1,def2,def3....so on target dir:/test2/jobs/def1,def2,def3....so on
scenario1: i want to compare that jobs folder in source and target directory both has exactly same no of files like def1,def2,def3 and so on.. and if there is any file not found in target it should capture that discrepency in log file.
scenario2: now once file level checking is done :
source dir:/test1/jobs/def1,def2,def3,mam1,mam2,mam3,mam4,try1,try2,try3,cus1,cus2,cus3,kit1,kit2,kit3.....so on
target dir:/test2/jobs/def1,def2,def3,mam1,mam2,mam3,mam4,try1,try2,try3,cus1,cus2,cus3,kit1,kit2,kit3.....so on
now i need to write a script where i should pass input parameter on run time as string like for eg if i give 'def'than script should compare the content of files starting with def only from source to target not all others.. and if content is mis matched than it should be captured in my log file.
Any help is much appreciated. Thanks in advance. J