need help with an easy task

Hello everyone my name is Telis and i just registered in this forum.. i just started programming in linux shell and i need help with this easy task..
this is my code

#!/bin/sh
echo "What is your First name?"
read name
if [ "$name"="Telis" ] ; then
echo "Hello Master."
else
echo "Who are you?"
fi

when i run this, whatever i input it always echoes Hello master.. even if i dont input something it will again echo Hello master.. how can i make this work? i cant find my mistake.. i appreciate any help :slight_smile:

(excuse me if my english is not so good. thank you in advance)

You need spaces on either side of the equals sign:

if [ "$name" = "Telis" ] ; then

You saw the result you did because test will return true if it has a non-blank string and false on a blank:

$ [ "abc=telis" ] && echo yes || echo no
yes
 
$ [ "" ] && echo yes || echo no
no

jesus! thank you very much Chubler_XL.. this is something it would take me ages to find on my own probably...