in reply to Re: sorting /etc/hosts (boo)
in thread sorting /etc/hosts

add to your DATA: 10.194.196.9 nnocws001 10.194.196.100 nnocws001 and you'll see it's not quite so straight-forward. you're doing a sort based on "standard string comparison order", instead of numerical. though the OP doesn't specify.