You're viewing a comment by Ryan and its responses.

September 02, 2008, 17:12

Here's a Python version. We're going for the longest one-liner, right?:

ryant@spitfire:~$ ifconfig | python -c "import sys; import re; print re.match(re.compile('.*addr:([0-9\.]*)\s.*'), [ln for ln in sys.stdin.readlines() if ln.find('inet')>=0][0]).group(1)"

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "server_90": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.