if condition issue

Hi, Unix Gurus,
I got some issue with my script.

#!/usr/bin/ksh
while read newstatus
do
if [ $newstatus="C" ]; then
        echo "It is finished "
else
        echo "Not Finished"
fi
done <checkresult.txt

basically, I want to read one file (the file only contains one word, but it dynamically changed), Based on the string it read do something. I my script, if it read as C, it should print out "It is finished" otherwise, "Not Finished", but I only got "It is finished", no matter what input is.
:wall:

Thanks in advance

Spaces (and quotes) are important:

if [ "$newstatus" = C ]; then

otherwise it's just a non-empty string, which would always evaluate to true.

$ test 1=2 && echo OK
OK
$ test 1 = 2 && echo OK
$

Thanks for your quick reply, it works