[plug] getting IP address in a shell script

Craig Ringer craig at postnewspapers.com.au
Tue Jul 30 17:57:46 WST 2002


Hi all
Any ideas about a non-ugly (ie pref not /sbin/ifconfig eth0 | awk ... ) 
method of getting the local machine's IP address into a variable in a 
shell script? There's probably something obvious I'm missing but apropos 
and google haven't helped on a quick glance.

-- 
Craig Ringer
GPG Key Fingerprint: AF1C ABFE 7E64 E9C8 FC27  C16E D3CE CDC0 0E93 380D
	-- if it ain't broke, add features 'till it is. (or:)
	while (! broken) { features ++ ; broken = isBroken(features) }




More information about the plug mailing list