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

Recent comments
1 day 4 hours ago
4 weeks 4 days ago
4 weeks 4 days ago
6 weeks 2 days ago
10 weeks 2 days ago
12 weeks 2 days ago
12 weeks 2 days ago
12 weeks 2 days ago
12 weeks 6 days ago
16 weeks 1 day ago