I have a script named temp.sh
. I am running it from another script like...
sh temp.sh | tr '|' '\n' > sel-employee
count=`wc -l sel-employee`
if [ '$count' == 0 ] ; then
echo "ERROR"
else
echo "SUCCESS"
fi
when I run this script if file sel-employee has zero line OR more then zero line in both cases it is output SUCCESS. I can not understand why?