2024-08-08 12:19:09 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
call_get_connected_wifi_name() {
|
2024-08-09 16:21:47 -03:00
|
|
|
# Source the get_connected_wifi_info.sh script
|
|
|
|
source ./scripts/get_connected_wifi_info.sh
|
2024-08-08 12:19:09 -03:00
|
|
|
|
|
|
|
# Call the function to get the Wi-Fi name and capture the returned Wi-Fi name
|
|
|
|
wifi_name=$(get_connected_wifi_name)
|
|
|
|
|
|
|
|
# Print the captured Wi-Fi name if it is not empty
|
|
|
|
if [ -n "$wifi_name" ]; then
|
|
|
|
echo "Connected Wi-Fi SSID: $wifi_name"
|
|
|
|
else
|
|
|
|
echo "No connected Wi-Fi devices found."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
call_get_connected_wifi_device() {
|
2024-08-09 16:21:47 -03:00
|
|
|
# Source the get_connected_wifi_info.sh script
|
|
|
|
source ./scripts/get_connected_wifi_info.sh
|
2024-08-08 12:19:09 -03:00
|
|
|
|
|
|
|
# Call the function to get the Wi-Fi device and capture the returned Wi-Fi device
|
|
|
|
wifi_device=$(get_connected_wifi_device)
|
|
|
|
|
|
|
|
# Print the captured Wi-Fi device if it is not empty
|
|
|
|
if [ -n "$wifi_device" ]; then
|
|
|
|
echo "Connected Wi-Fi Device: $wifi_device"
|
|
|
|
else
|
|
|
|
echo "No connected Wi-Fi devices found."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Call the functions
|
|
|
|
call_get_connected_wifi_name
|
|
|
|
call_get_connected_wifi_device
|