slitaz-base-files diff 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 diff
1.1 --- a/rootfs/usr/bin/ipinfo Thu Nov 27 16:26:29 2014 +0200 1.2 +++ b/rootfs/usr/bin/ipinfo Tue Feb 28 15:08:28 2017 +0100 1.3 @@ -10,6 +10,6 @@ 1.4 iface="$INTERFACE" 1.5 fi 1.6 1.7 -ifconfig ${iface} | fgrep 'inet addr:' | cut -d: -f2 | awk '{print $1}' 1.8 +ifconfig ${iface} | awk '/inet addr/{print substr($1,6)}' 1.9 1.10 exit 0