How to sort IP addresses using the GNU sort utility
Submitted by linportal on Sun, 2006-08-20 15:02
Need 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
- 6832 reads








Recent comments
1 week 3 days ago
1 week 3 days ago
1 week 6 days ago
3 weeks 2 days ago
4 weeks 11 hours ago
9 weeks 2 days ago
10 weeks 12 hours ago
10 weeks 1 day ago
10 weeks 5 days ago
11 weeks 5 days ago