I'm trying to check if string contains any wildcards. Here is my failing attempt:
#!/bin/bash
WILDCARDS='* . ? ! ] ['
a="foo*bar"
for x in $REJECTED_WILDCARDS
do
if [[ "$a" == *"$x"* ]]
then
echo "It's there!";
fi
done
Any suggestions?
.included in the list?