function get-ssid() {
  # TODO: ubuntu
  local WIFI_CMD=/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
  if [ -f "$WIFI_CMD" ]; then
    $WIFI_CMD -I | awk '/ SSID/ {print substr($0, index($0, $2))}'
  fi
}

function get-ssid() {
  # TODO: ubuntu
  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'
}

--- 
+++ 
@@ -1,4 +1,7 @@
 function get-ssid() {
   # TODO: ubuntu
-  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'
+  local WIFI_CMD=/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
+  if [ -f "$WIFI_CMD" ]; then
+    $WIFI_CMD -I | awk '/ SSID/ {print substr($0, index($0, $2))}'
+  fi
 }
Make get-ssid not crash on linux
