Hello, On Thu, 01 Oct 2009, Manfred Hollstein wrote:
Make sure, this is *one* line! So this should be:
EXT_IP=`/sbin/ifconfig eth0 | sed -n -e 's,.*inet addr:[ ]*\([^ ]*\) .*$,\1,p'`
For completeness (I hope the output format is still the same), and with $() instead of ``: export LANG=C EXT_IP=$(/sbin/ip addr show eth0 | sed -n 's/^ *inet \([0-9.]\+\) .*eth0$/\1/p') INT_IP=$(/sbin/ip addr show eth1 | sed -n 's/^ *inet \([0-9.]\+\) .*eth1$/\1/p') (if you make one line, remove the '\' at the end of the first line) The '.*eth0$' at the end of the expression is because interface-aliases show up in the output. HTH, -dnh -- Warning: Pregnancy can cause birth -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org