vendredi 23 juin 2017

syntax error near unexpected token 'fi' while executing cloudfoundry login

I am trying automate few cf commands using Shell Scripting. Started with cf login following is my code

test1=$(cf login command)

echo $test1

if [[ $test1 == "Targeted space" ]]; then

echo "successfull"

fi

after run the above command, i got the echo output and then ran into (syntax error near unexpected token 'fi') error I am not able to figure out the problem. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire