Mar 15, 2011 #1 w5000 Technical User Nov 24, 2010 223 PL how to sort output as below by last octet number of IPs in the second column? Code: 10.116.27.63 10.116.27.63 is alive 10.116.27.7 10.116.27.7 is alive 10.116.27.8 10.116.27.8 is alive 10.116.27.9 10.116.27.9 is alive
how to sort output as below by last octet number of IPs in the second column? Code: 10.116.27.63 10.116.27.63 is alive 10.116.27.7 10.116.27.7 is alive 10.116.27.8 10.116.27.8 is alive 10.116.27.9 10.116.27.9 is alive
Mar 15, 2011 1 #2 feherke Programmer Aug 5, 2002 9,540 RO Hi Code: sort -t . -k 7 -n /input/file Tested with GNU coreutils [tt]sort[/tt]. Feherke. http://free.rootshell.be/~feherke/ Upvote 0 Downvote
Hi Code: sort -t . -k 7 -n /input/file Tested with GNU coreutils [tt]sort[/tt]. Feherke. http://free.rootshell.be/~feherke/
Mar 15, 2011 1 #3 PHV MIS Nov 8, 2002 53,708 FR With legacy sort: Code: sort -t. -k7n /path/to/input Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Mar 15, 2011 #4 stefanwagner Programmer Oct 19, 2003 2,373 DE Sorting from the back: Code: rev /path/to/input | sort -n -k 3 | rev don't visit my homepage: http://home.arcor.de/hirnstrom/minis/index.html Upvote 0 Downvote
Sorting from the back: Code: rev /path/to/input | sort -n -k 3 | rev don't visit my homepage: http://home.arcor.de/hirnstrom/minis/index.html