I check a file that have names with wildcards. I need to compare a variable with these names.
To do that. I do:
while read -r LineExc; do
if [[ "${job}" == ${LineExc} ]]; then
echo "found"
excepcion=yes
else
echo "not found"
fi
done < exceptions.cfg
The exceptions have:
car*
house
So if job variable with value house, it goes to not found, but it should go to found.
Any help please?