Work related blog where I can keep a bunch of random UNIX stuff.
and then find dupes:sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 /etc/hosts | cut -f1 -d " "| cut -c1-13 | uniq -dYMMV on the -c1-13 part... could be up to 16 chars long e.g. 255.255.255.255 after all.
Post a Comment
1 comment:
and then find dupes:
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 /etc/hosts | cut -f1 -d " "| cut -c1-13 | uniq -d
YMMV on the -c1-13 part... could be up to 16 chars long e.g. 255.255.255.255 after all.
Post a Comment