mardi 29 mars 2016

if statement string comparison

What is that i'm doing wrong over here ? the script by default enters this IF statement & displays the echo statement to exit.

#!/bin/ksh


server=$1
dbname=$2
IFS="
"
if [[ "${dbname}" != "abc_def_data" || "${dbname}" != "abc_def01_data" ]]; then
        echo "Msg: Triggers can only be applied to CMS_JAD:abc_def_data/abc_def01_data!"
        exit 0
fi

Aucun commentaire:

Enregistrer un commentaire