10 lines
197 B
Plaintext
10 lines
197 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# (1) Get wireless iface #
|
||
|
IFACE=`ifconfig | grep -o -P "^w\w+"`;
|
||
|
|
||
|
# (2) Get Access Point ID #
|
||
|
IP=`ifconfig $IFACE | grep -o -P 'inet addr:[\d\.]+' | sed 's/inet addr://'`;
|
||
|
|
||
|
echo $IP;
|