Hi All,
Im trying to compare the
output with another set of rowcount outputs which returned from sql...
For Eg : Im storing the first outputs as below
and comparing this with the another set of outputs.
I have to do this comparison for each counts.
for eg,
retunrs 10 rows and
returns another 10 rows.. I have to compare if each row is matching or not.
Can you help this with script.
I have tried this but not returning any outputs
Im trying to compare the
Code:
wc -l
For Eg : Im storing the first outputs as below
Code:
<srccnt=`wc -l $HOME/*.csv | awk {'print $1'}`
Code:
descnt=`seclect count(*) from tables..
for eg,
Code:
srccnt
Code:
descnt
Can you help this with script.
I have tried this but not returning any outputs
Code:
testcount(){
if [ "$srccnt" == "$descnt" ]; then
echo "Count Matches">>$LOG
retval=0
else
echo "MISMATCH">>$LOG
retval=1
fi
}