Blogs
How to sort IP addresses using the GNU sort utility
Submitted by linportal on Sun, 2006-08-20 15:02Need to sort list of IP addresses in shell? Here’s the invocation that works:
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4
Thanks for this tip goes to Paul Heinlein.
Related:
How to grep for IP addresses using the GNU egrep utility
»
- linportal's blog
- Add new comment
- 7818 reads

Recent comments
3 days 20 hours ago
3 weeks 5 days ago
8 weeks 1 day ago
8 weeks 1 day ago
9 weeks 6 days ago
13 weeks 6 days ago
15 weeks 6 days ago
15 weeks 6 days ago
15 weeks 6 days ago
16 weeks 3 days ago