#!perl $s='(\d+\.\d+\.\d+\.\d+)'; while(<>) { $d[$i++]=$_;} print sort {my($c,$d); $a=~/$s/; $c=$1; $b=~/$s/; $d=$1; $c cmp $d;} @ +d;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sort in IP in 2 lines.
by I0 (Priest) on Aug 07, 2001 at 10:17 UTC | |
by sauoq (Abbot) on May 30, 2003 at 20:54 UTC | |
|
Re: Sort in IP in 2 lines.
by sauoq (Abbot) on May 30, 2003 at 21:00 UTC | |
by Aristotle (Chancellor) on May 30, 2003 at 21:17 UTC | |
|
Re: Sort in IP in 2 lines (program repair shop)
by Aristotle (Chancellor) on May 30, 2003 at 21:53 UTC |