test_command='curl -Is http://www.google.com | head -n 1 '
if [ $(test_command) == "200" ] ;
echo " command executed successfully
execute all commands up to else statement
or to fi if there is no else statement";
echo " command failed so
execute all commands up to fi";
xxx.sh: line 11: syntax error near unexpected token `fi'
xxx.sh: line 11: `fi'