Merhaba hocalarım kodları doğru analiz etmeme rağmen hata ile karşılaşıyorum.

Kod:

test_command='curl -Is http://www.google.com | head -n 1 '
if [ $(test_command) == "200" ] ;
then
echo " command executed successfully
execute all commands up to else statement
or to fi if there is no else statement";

else
echo " command failed so
execute all commands up to fi";
fi


Çıktısı:


xxx.sh: line 11: syntax error near unexpected token `fi'
xxx.sh: line 11: `fi'