I'm trying to get the script below to take the connection uuid passed to it (by networkmanager), compare it against a list of uuids for my home connections (both physical and VPN) and run certain commands.  However, the script appears to go to the else clause all the time, even though the uuid is correct.#!/bin/bashecho $CONNECTION_UUIDHome_UUIDs=5b509e73-8f08-475c-a14d-7037f2f4b87a ba36c69e-c3f1-4480-a484-1eea105311b2 f3889052-719f-4b88-8b94-e1fa189d44f9if [[ $Home_UUIDs == *$CONNECTION_UUID* ]]; then        case $2 in                up)                echo Conecting to Home netork...                ntpdate -vs 192.168.0.18                service ntp start                ;;                down)                echo Disconnecting from home network                service ntp stop                ;;        esacelse        echo We're not at home...        service ntp stopfiexit 0
Bash script not running as expected
bash;shell script;networkmanager;uuid
Finally fixed it by replacing the statement in brackets with[[ $Home_UUIDs =~ $CONNECTION_UUID ]]instead of[[ $Home_UUIDs == *$CONNECTION_UUID* ]]