can u please confirme the correct

st1=hello
st2=world

if [ [ "$i" -ne 4 ] && [ ["${stt}"=="${st1}" ] || [ "${stt}"=="${st2}" ] ] ]

.....
....

fi

Can you please explain what you want? :confused:

st1=hello
st2=world

for ((i=0 ; i<=5 ; i++ ))
do

if [ [ "$i" -ne 4 ] && [ ["${stt}"=="${st1}" ] || [ "${stt}"=="${st2}" ] ] ]

#do some stuff

fi

done

this is what i am doing

st1=hello
st2=world

if [ [ "$i" -ne 4 ] && [ ["${stt}"=="${st1}" ] || [ "${stt}"=="${st2}" ] ] ]

.....
....

fi

but its giving error

code_test3: line 20: [: too many arguments
code_test3: line 20: [: ]: binary operator expected

Would write it like this and also you got an example to play around and try it out:

st1=hello
st2=world
stt=world
i=5

if (( "${i}" != 4 )) && [[ "${stt}" == "${st1}" || "${stt}" == "${st2}" ]]; then
        echo "found it"
else
        echo "no matches"
fi

it is not working.