How do I compare two string variables in an ‘if’ statement in Bash? [duplicate]

For string equality comparison, use: if [[ “$s1” == “$s2” ]] For string does NOT equal comparison, use: if [[ “$s1” != “$s2” ]] For the a contains b, use: if [[ $s1 == *”$s2″* ]] (and make sure to add spaces between the symbols): Bad: if [[“$s1” == “$s2”]] Good: if [[ “$s1” == … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)