[conspire] Puzzle: How do you sort IP address lists?

Don Marti dmarti at zgp.org
Tue Nov 7 13:16:52 PST 2006

Alternate approach: 

tr '.' ' ' < address_list | xargs printf '%03d.%03d.%03d.%03d\n' \
| sort -u | sed -re 's/\b0+//g' ) < address_list

Another way would be to multiply each address out
into an int, sort, and re-format.

Don Marti                    
dmarti at zgp.org

More information about the conspire mailing list