Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (26 sloc) 661 Bytes
#!/bin/sh
iwconfig wlan2 2>&1 | grep -q no\ wireless\ extensions\. && {
echo wired
exit 0
}
essid=`iwconfig wlan2 | awk -F '"' '/ESSID/ {print $2}'`
stngth=`iwconfig wlan2 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
echo $stngth
bars=`expr $stngth / 7`
echo $bars
case $bars in
0) bar='[----------]' ;;
1) bar='[/---------]' ;;
2) bar='[//--------]' ;;
3) bar='[///-------]' ;;
4) bar='[////------]' ;;
5) bar='[/////-----]' ;;
6) bar='[//////----]' ;;
7) bar='[///////---]' ;;
8) bar='[////////--]' ;;
9) bar='[/////////-]' ;;
10) bar='[//////////]' ;;
*) bar='[----!!----]' ;;
esac
echo $essid $bar
exit 0
Something went wrong with that request. Please try again.