10 lines
212 B
Plaintext
10 lines
212 B
Plaintext
|
#!/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;
|