For When You Can't Have The Real Thing
[ start | index | login ]
start > Sort IPs

Sort IPs

Created by dave. Last edited by dave, 7 years and 75 days ago. Viewed 1,513 times. #2
[diff] [history] [edit] [rdf]
Using gnu sort:
$ sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 somefile.txt

For this to work, the file you're sorting needs to have the IP address as the first item on each line.


no comments | post comment

Virtual Dave Megaplex:

Internet Explorer 6 Users >>Click Here

(read this note about local search)

Logged in Users: (0)
… and 19 Guests.

Editing: snipsnap-help, Image Macro

(Et auditum est, et idcirco ego nunc simulare)

Installed 7 years and 67 days ago
Powered By >>SnipSnap Version 1.0b1-uttoxeter

This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt