Re: Get the ip address without using root?

2006-08-20 Thread Paul Johnson
On Friday 18 August 2006 03:09, Deephay wrote: Greetings all, How to get the address of the local machine without using root? ifconfig cannot be issued by a common user. TIA! Yes, it can. Type the full path: /sbin/ifconfig -- Paul Johnson Email and IM (XMPP Google Talk): [EMAIL

[solved]Re: Get the ip address without using root?

2006-08-19 Thread Deephay
thank you all! Deephay -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Get the ip address without using root?

2006-08-18 Thread Deephay
Greetings all, How to get the address of the local machine without using root? ifconfig cannot be issued by a common user. TIA! Deephay -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: Get the ip address without using root?

2006-08-18 Thread Linas Žvirblis
How to get the address of the local machine without using root? ifconfig cannot be issued by a common user. TIA! It can, '/sbin/ifconfig'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: Get the ip address without using root?

2006-08-18 Thread Albert Dengg
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Aug 18, 2006 at 06:09:59PM +0800, Deephay wrote: Greetings all, How to get the address of the local machine without using root? ifconfig cannot be issued by a common user. TIA! Why? it works fine here (though you have to enter the full

Re: Get the ip address without using root?

2006-08-18 Thread Steve Kemp
On Fri, Aug 18, 2006 at 06:09:59PM +0800, Deephay wrote: How to get the address of the local machine without using root? ifconfig cannot be issued by a common user. TIA! Yes it can, the only problem is that by default /sbin will not be on the PATH of a non-root user. Just run it as

Re: Get the ip address without using root?

2006-08-18 Thread Romain Francoise
Steve Kemp [EMAIL PROTECTED] writes: /sbin/ifconfig eth0 | grep inet addr | awk '{print $2}'| awk -F: '{print $2}' awk can select the line and do the double split in one go: /sbin/ifconfig eth0 | awk '($0 ~ /^ +inet addr:/) { split($2, a, :); print a[2] }' -- ,''`. : :' :

Re: Get the ip address without using root?

2006-08-18 Thread Alexander Farber
/sbin/ifconfig eth0 | awk '/^ +inet addr:/ { split($2, a, :); print a[2] } or /sbin/ifconfig eth0 | sed -ne 's,^.*inet addr:\([0-9.]*\).*,\1,p' -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]