Feb 1, 2006 #1 jdespres MIS Aug 4, 1999 230 US We are in the process of migrating a application from one server to another. With so many hands in the cookie jar the hosts file is a mess! I would like to clean it up.... I would like to sort it and arrange the 2nd column at the same position.... Thanks
We are in the process of migrating a application from one server to another. With so many hands in the cookie jar the hosts file is a mess! I would like to clean it up.... I would like to sort it and arrange the 2nd column at the same position.... Thanks
Feb 1, 2006 1 #2 p5wizard IS-IT--Management Apr 18, 2005 3,165 BE egrep '^[1-9]' hosts|while read adr names do printf "%-16s %s\n" ${adr} "${names}" done|sort you could use awk also I guess HTH, p5wizard Upvote 0 Downvote
egrep '^[1-9]' hosts|while read adr names do printf "%-16s %s\n" ${adr} "${names}" done|sort you could use awk also I guess HTH, p5wizard
Feb 3, 2006 Thread starter #3 jdespres MIS Aug 4, 1999 230 US This worked! Thanks for the help! Upvote 0 Downvote