I want to test if the $ip is equal to one of the two values: "a" or "b". When I test against only "a" it works. I didn`t want to do || and perform another grep+cut, since I have done those once, I would like to take the result and test it against these 2 values.
if [[ $(grep -e "$ip" FILE |cut -d' ' -f5) =~ 'a\|b'; then
echo "OK"
fi