1. make a new file:
vi /bin/lanshow
2. fill it with following data in it:
#!/bin/sh
netstat -ain | awk '$1 ~ /^lan/ && $1 !~ /:/ {print $1}' | sort | \
while read i
do
ifconfig $i
done
3. start it:
/bin/lanshow (or only lanshow)
Primer:
bash-4.2# /bin/lanshow
lan0: flags=2000000000001843
inet 192.168.1.1 netmask ffffff80 broadcast 192.168.1.255
lan1: flags=2000000000001843