So I have three instances - bincasper32, bincasper41, bincasper42.
They all need to be mapped to port 23471
I wrote a small script that scans the config files after they
are configured, with a few functions.
this works fine
Code:
function ports_bincasper
{
if [[ "$application" == "bincasper41" ]] && [[ "$port" -ne "23471" ]] ;
then
echo " The port to $account is NOT configured correctly"
fi
}
But I would rather not have three seperate functions.
I tried putting a wildcard in the application comparison, but it does not work.
Is there a way for me to do this?
Code:
function ports_bincasper
{
if [[ "$application" == "bincasper*" ]] && [[ "$port" -ne "23471" ]] ;
then
echo " The port to $account is NOT configured correctly"
fi
}