blob: 53464dce67d0d4dfd9db7b554fca2a8f7ae364c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
. include.sh
id=$1
trap "rm -f ${WMII_DIR}/rbar/${id}" EXIT
iwinfo() {
interface=$1
iwconfig "$interface" |
sed -r 's/ {2,}/\n/g' |
sed -e '/^\s*$/d' -e 's/:\s*/=/' \
-e '1s/^/Interface=/' \
-e '2s/^/MAC Protocol=/'
}
while connected_to_x_server; do
{
printf 'label '
iwinfo wlp2s0|grep -E '^(ESSID|Link Quality)='|sed 'N;s/\n/ | /'
} | sponge >> "${WMII_DIR}/rbar/${id}"
sleep 1
done
|