SATS/lib/netid/ip

10 lines
197 B
Plaintext
Raw Permalink Normal View History

#!/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;