Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how do I find my IP address



On 2004-06-13 23:37:08 -0400, Jason Price wrote:
> On most unix flavors, some varient of:
> 
> ifconfig -a | grep inet | grep -v '127.0.0.1' | awk '{print $2}'
> 
> should work.

Not under linux. This is still OS-dependent. With ifconfig, you
probably need to filter on \d+\.\d+\.\d+\.\d+ in particular.

BTW, can zsh do such things internally (without using external
programs like sed or perl)?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Messages sorted by: Reverse Date, Date, Thread, Author