diff --git a/scripts/wifi-ssid b/scripts/wifi-ssid index 29af3cc..1df823f 100755 --- a/scripts/wifi-ssid +++ b/scripts/wifi-ssid @@ -2,3 +2,11 @@ # Extract the wifi username (SSID) # Refer: "iw dev wlan0 link" command output for this + +ssid=$(iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}') + +if [ -n "$ssid" ]; then + echo "WiFi SSID: $ssid" +else + echo "WiFi SSID not available" +fi