Am Samstag 29 Januar 2005 15:31 schrieb Gerhard Gaußling:
> $ su --command="ifconfig |egrep -A1 Point-to-Point|egrep '(inet
> addr:)'| sed -n '1p'"|gawk '{print $2}'|cut -c6-22
better You use this script, it doesn't need root access:
#/usr/local/bin/myip
#!/bin/bash
echo "Current IP is:"
/sbin/ifconfig |egrep -A1 Point-to-Point|egrep '(inet addr:)'| \
sed -n '1p'|gawk '{print $2}'|cut -c6-22
Kind regards
Gerhard Gaußling