From: filip1
Hi all,
Does anyone know a command or a little script giving you only the ip adress of your card ?
I mean by this : command ----> gives you only ---> aaa.bbb.ccc.ddd
Thanks a lot,
Filip.
From: Anders Dahlqvist
From: Anders Dahlqvist
From: filip1
Hi all,
Does anyone know a command or a little script giving you only the ip adress of your card ?
I mean by this : command ----> gives you only ---> aaa.bbb.ccc.ddd
Thanks a lot,
Filip.
tisdag 21 november 2000 15:02 skrev filip1: try ifconfig -a or ifconfig eth0 -- Anders Dahlqvist, arbetslös *NIX-tekniker ------------------ When does summertime come to Minnesota, you ask? Well, last year, I think it was a Tuesday.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- Powered by SUSE 7 vhf@skynet.be
Message-Id: <5.0.2.1.2.20001123125904.009e8ec0@127.0.0.1>
Date: Thu, 23 Nov 2000 13:06:23 +0100
From: Mikael Eriksson
Hi all,
Thanks for your reply, but today I found a quite usefull cmd : getethip Didn't have the time to explore more, was root, it gave me directly the ip adress of eth0, don't know if any option for eth1.... exists.
cheers
filip
Le mar, 21 nov 2000, Anders Dahlqvist a écrit :
Hi all,
Does anyone know a command or a little script giving you only the ip adress of your card ?
I mean by this : command ----> gives you only ---> aaa.bbb.ccc.ddd
Thanks a lot,
Filip.
tisdag 21 november 2000 15:02 skrev filip1: try ifconfig -a or ifconfig eth0 -- Anders Dahlqvist, arbetslös *NIX-tekniker ------------------ When does summertime come to Minnesota, you ask? Well, last year, I think it was a Tuesday.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq -- Powered by SUSE 7
vhf@skynet.be
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
From: Jesse Marlin
Hi all,
Does anyone know a command or a little script giving you only the ip adress of your card ?
I mean by this : command ----> gives you only ---> aaa.bbb.ccc.ddd
#!/bin/bash extif="eth0" extip=$($ifconfig ${extif} | sed -ne '/addr:/{s/.*addr:\([^ ]*\).*/\1/;p;}') echo $ip
Thanks a lot,
Filip.
-- Powered by SUSE 7
vhf@skynet.be
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Message-ID: <3A1B24A3.93437A4@bellsouth.net>
Date: Tue, 21 Nov 2000 20:42:59 -0500
From: Damon Register
filip1 writes:
Hi all,
Does anyone know a command or a little script giving you only the ip adress of your card ?
#!/bin/bash extif="eth0" extip=$($ifconfig ${extif} | sed -ne '/addr:/{s/.*addr:\([^ ]*\).*/\1/;p;}') echo $ip
looks like there are quite a few ways to do this. Here is one that works for me: extip="`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" Damon Register
From: Bernd Felsche
Jesse Marlin wrote:
filip1 writes:
Does anyone know a command or a little script giving you only the ip adress of your card ?
#!/bin/bash extif="eth0" extip=$($ifconfig ${extif} | sed -ne '/addr:/{s/.*addr:\([^ ]*\).*/\1/;p;}') echo $ip
looks like there are quite a few ways to do this. Here is one that works for me:
extip="`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
How about sed -n 's/ .* eth0$//p' /proc/net/arp ? -- /"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia \ / ASCII ribbon campaign | I'm a .signature virus! | X against HTML mail | Copy me into your ~/.signature| / \ and postings | to help me spread! |
participants (6)
-
bernie@innovative.iinet.net.au
-
dahlqvist@sundsvall.mail.telia.com
-
dregiste@bellsouth.net
-
jlm@compgen.com
-
master33@hem.passagen.se
-
vhf@skynet.be