Au choix:
Code:
1 2 3 4 5 6 7 8 9
| Cft_idf=SIMUR1
if [[ "$Cft_idf" != "SIMUR1" && "$Cft_idf" != "SIMUE1" ]]; then
echo "Cft_idf est autre que SIMUR1 ou SIMUE1"
fi
if [[ "$Cft_idf" = "SIMUR1" || "$Cft_idf" = "SIMUE1" ]]; then
echo "Cft_idf est parmi SIMUR1 ou SIMUE1"
fi |
Remarque:
Comme une valeur ne peut pas être égale à deux valeurs différentes, le test suivant est TOUJOURS faux:
Code:
1 2 3
| if [[ "$Cft_idf" = "SIMUR1" && "$Cft_idf" = "SIMUE1" ]]; then
echo "Cft_idf est à la fois égal à SIMUR1 et à SIMUE1"
fi |
Son contraire (ton code) est donc toujours vrai! :D