SATS/lib/netid/ap

10 lines
212 B
Plaintext
Raw Normal View History

#!/bin/bash
# (1) Get wireless iface #
IFACE=`ifconfig | grep -o -P "^w\w+"`;
# (2) Get Access Point ID #
AP=`iwconfig $IFACE | grep -o -P 'ESSID:"SATS_.+"' | sed 's/ESSID:"SATS_//' | sed 's/"$//'`;
echo $AP;