add demo script for announce wlan

This commit is contained in:
chrys
2016-10-18 18:04:37 +02:00
parent c5642c4118
commit ca87c7694b
2 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/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