Mailinglist Archive: opensuse (1503 mails)
| < Previous | Next > |
Re: [opensuse] Boot Script
- From: "Wong" <wongsuse@xxxxxxxxxx>
- Date: Sat, 3 Oct 2009 10:04:11 +0800
- Message-id: <EE4E264037DB457FB63B3C16CCBA03B5@pc>
Hi David
Yes, the output is 100% same.
Thanks
Wong
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
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.
Yes, the output is 100% same.
Thanks
Wong
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |