Hi,
file contains only one row.
END OF FILE. ROW COUNT: 8,9
We need to check the file contains exact string "END OF FILE. ROW COUNT: " if yes, get the 8,9 values
then compare if both are equal print the "equal" if not "notequal".
Thanks,
Hi,
file contains only one row.
END OF FILE. ROW COUNT: 8,9
We need to check the file contains exact string "END OF FILE. ROW COUNT: " if yes, get the 8,9 values
then compare if both are equal print the "equal" if not "notequal".
Thanks,
awk -F"[ ,]" '/END OF FILE/{print $NF != $(NF-1)?"notequal":"equal"}' file
Thanks,as per validation it should come equal,it coming as "notequal",but i need implement the in script,if equal got to one step else another step...
Please help me
Something like this?
sed -n 's|^END OF FILE. ROW COUNT: \([0-9]\{1,\}\),\([0-9]\{1,\}\)|\1 \2|p' <filename>|read num1 num2
if [ ! -z "$num1" -a ! -z "$num2" ]
then
if [ $num1 -eq $num2 ]
then
echo Equal
else
echo Not equal
fi
fi
Thanks lot working fine...