/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#! /bin/bash iface="`/sbin/iwconfig 2>&1 | grep '802.11' | cut -d" " -f1`" /sbin/ifconfig ${iface} | grep 'inet addr:' | grep -v 'inet6\|127.0.0.1' | cut -d: -f2 | cut -d" " -f1