ivanzoid
9/8/2018 - 12:07 PM

Bash compare strings.sh

# Bash compare strings

if [ "$x" = "valid" ]; then
  echo "x has the value 'valid'"
fi

if [ "$x" != "valid" ]; then
  echo "x has the value 'valid'"
fi