slitaz-base-files view rootfs/usr/bin/ipinfo @ rev 327

libtaz.sh: get_cols is not working: find an other way :-)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 28 15:08:28 2017 +0100 (2017-02-28)
parents 8a1ed3d7ebc2
children dc2507062df3
line source
1 #!/bin/sh
2 #
3 # ipinfo: Show SliTaz local IP address
4 #
5 . /etc/network.conf
7 if [ "$WIFI" == "yes" ]; then
8 iface="$WIFI_INTERFACE"
9 else
10 iface="$INTERFACE"
11 fi
13 ifconfig ${iface} | awk '/inet addr/{print substr($1,6)}'
15 exit 0