fenrir/config/scripts/wlan__-__key_y.sh
2016-10-18 18:04:37 +02:00

10 lines
373 B
Bash
Executable File

#!/bin/sh
#output the ESSID and signal level
#needs iw (for iwconfig)
if [[ $(nmcli device wifi | wc -l ) -ge 2 ]]; then
echo "Signal $(nmcli -f IN-USE,SIGNAL device wifi | grep "*" | tail -n1 | cut -f 2 -d '*') %"
echo "Name $(nmcli -f IN-USE,SSID device wifi | grep "*" | tail -n1 | cut -f 2 -d '*') "
else
echo "Leider keine Wlan verbindung $(whoami)"
fi