The first part of the if statement is always coming true and it should not. If I run the wirelessStatus command in the terminal nothing comes up since wireless is enabled. What am I missing here? Thanks
Code:
wirelessSsid=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep -w 'SSID' | awk '{print $2}'`
wirelessStatus=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep -w 'AirPort' | awk '{print $2}'`
statusText='Off'
if [ $wirelessStatus=$statusText ]; then
echo "Wireless SSID: Disabled"
else
echo Wireless SSID: $wirelessSsid
fi