Hello
I need to check if following three files exist in a file, how to do that in shell script:
1. ALL MACHING RECORD COLUMNS MATCHED (Baseline and Regression File)
2. Total Mismatched Records (Baseline File): 0
3. Total Mismatched Records (Regression File): 0
Currently I am seaching only for one line "ALL MACHING RECORD COLUMNS MATCHED (Baseline and Regression File)" and doing it like this:
Code:
if [ -s $regfiles_name ]; then
grep "ALL MACHING RECORD COLUMNS MATCHED (Baseline and Regression File)" $regfiles_name
retval=$?
if [ $retval != 0 ]; then
echo $regfiles " - There is a mismatch" >> reg_email_body
else
echo $regfiles " - Matched" >> reg_email_body
fi
fi
How can I tweak it to check if all 3 lines exist?
Thanks!!