[Tfug] net
Glen Pfeiffer
glen at thepfeiffers.net
Sat May 10 21:08:59 MST 2008
Rich wrote:
> On May 4, 2008, at 4:32 pm, Glen Pfeiffer wrote:
>> On 04/05/08 16:23 -0700, ray reeves wrote:
>>> Is there a command to list all my network devices IP addresses?
>>
>> As root:
> why?
>
> /sbin/ifconfig is enough for me. Are you using SELinux or something?
Nope, just wasn't aware of /sbin/ifconfig. Just typing 'ifconfig' as a
non-privileged user yeilds 'ifconfig: command not found'.
>> ifconfig
>>
>> It lists more than just the addresses. So just look for the inet addr:
section.
>
> This is why the Good Lord gave us grep and sed and for loops!
Too much work. My brain can parse the output faster than I can
write anything like that. Granted, if I needed it for something
then I'd wrap that in a script. But generally speaking, the
standard output works fine for me.
--
Glen
More information about the tfug
mailing list