Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Using Unix sort

by Rhose (Priest)
on Aug 31, 2001 at 22:35 UTC ( #109481=note: print w/replies, xml ) Need Help??

in reply to sorting /etc/hosts

As posted above, I would use the Unix sort -- fields are delimited with a dot, and you want to numerically sort on the 4th field.
sort -t. +3n /etc/hosts
Does that work for you?

Replies are listed 'Best First'.
Re: Using Unix sort
by tmbailey123 (Initiate) on Aug 31, 2001 at 23:14 UTC
    excuse me I replied to the wrong reply. yes

    sort -t +3n /etc/hosts

    works !

    thx again


Re: Using Unix sort
by tmbailey123 (Initiate) on Aug 31, 2001 at 23:07 UTC
    Yes, I tried a sort -n but, here is a snippet of my output.

    <code> romulus nnocws014 wslkms01 wslknms01 nnocws016 nnocws017 txwl008w nnocws019 txwl015w otter nnocweb01 shemp dvwl000s spanky buckwheat datapro darla txwl018w nnocdev01

    this is not what we are looking for.

    kind regards


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://109481]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2019-08-21 01:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found