#!/bin/bash #Copyright 2004 William Stearns #Released under the GPL. #Assumes single IP address in left hand column #Sample: #echo -e '9.9.9.9 again\n11.11.11.11 hello' | sort #echo -e '9.9.9.9 again\n11.11.11.11 hello' | padip | sort sed \ -e 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\(.*\)/00\1.00\2.00\3.00\4\5/' \ -e 's/^[0-9]*\([0-9][0-9][0-9]\)\.[0-9]*\([0-9][0-9][0-9]\)\.[0-9]*\([0-9][0-9][0-9]\)\.[0-9]*\([0-9][0-9][0-9]\)\(.*\)/\1.\2.\3.\4\5/'