lundi 3 décembre 2018

BASH: If - Compare two strings

I am trying to compare output of a command with a string.

# echo "$status"
Stateretired
# if [ "$status" == "Stateretired" ] ; then echo "Instance down"; else echo "Well nah"; fi
Well nah
#

Aucun commentaire:

Enregistrer un commentaire