In a bash script, I'm willing to check if a parameter has a boolean value ("true" or "false").
I'm attempting this in two scripts in two different ways, both failing.
I've checked many Stack Exchange hints, and I believe doing what I should, but it isn't the case.
if [ "$2" != "true" ] -a [ "$2" != "false" ]; then
echo "Indiquez si Geoserver est en installation initiale (false) ou update (true)" >&2;
exit 1;
fi
fails with the message Geoserver.sh: 12: [: true: unexpected operator
if [[ "$3" != "true" && "$3" != "false" ]]; then
echo "Indiquez si Kafka est en installation initiale (false) ou update (true)" >&2;
exit 1;
fi
fails with Kafka.sh: 18: [[: not found