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
- 7742 reads

Recent comments
4 weeks 1 day ago
4 weeks 1 day ago
5 weeks 6 days ago
9 weeks 6 days ago
11 weeks 6 days ago
11 weeks 6 days ago
11 weeks 6 days ago
12 weeks 3 days ago
15 weeks 6 days ago
17 weeks 16 hours ago