I am working on a small homework assignment that is asking me to write a script that asks for four words, and a user must type it exactly as it is echo.My issue is that in my output, it is not giving me an echo for false statements. Everything I put in my if is true, and gives me the first approved echo statement. Is there an issue with the setting of variables, or the brackets and parenthesis? I've been trying to put them in all sorts of different variations throughout the if portion, but can't seem to get it to kick the false output. I also use shell check as my syntax check source, and it is showing the script as being functional. Any help would be appreciated, here is what I have written.#!/bin/bashvarname1=evenvarname2=oddvarname3=zerovarname4=negative# Ask the user for one of four select wordsecho Type one of the following words:echo even, odd, zero, negativeread varwordif [[ ($varword -eq $varname1 ) || ($varword -eq $varname2 ) || ($varword -eq $varname3 ) || ($varword -eq $varname4 ) ]]then    echo The approved word you have selected is $varword .else    echo The unapproved word you have selected is $varword . Please try again.fi
Script that asks for four words, then tells the user the word they chose. Output error?
bash;shell script
Use = for string comparisons, not -eq.if [[ ($varword = $varname1 ) || ($varword = $varname2 ) || ($varword = $varname3 ) || ($varword = $varname4 ) ]]alternatively, use a regexp:if [[ $varword =~ ^(even|odd|zero|negative)$ ]] ; then