bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sort (gnu textutils) 2.0


From: Phil Wood
Subject: sort (gnu textutils) 2.0
Date: Wed, 30 Jul 2003 14:11:17 -0600

OS: Linux

Question about +POS -POS vs -k

Given data in /tmp/list:

  10.165.114.153
  10.165.114.236
  10.165.114.82
  10.165.114.225
  10.165.115.131
  10.165.114.163

then:

  % sort -t\. -n +2 -3 +3 < /tmp/list
  10.165.114.82
  10.165.114.153
  10.165.114.163
  10.165.114.225
  10.165.114.236
  10.165.115.131
  
yields what I expect.

But,

  % sort -nt\. -k3,4 -k4 < /tmp/list
  10.165.114.153
  10.165.114.163
  10.165.114.225
  10.165.114.236
  10.165.114.82
  10.165.115.131
  
does not.

Is this just a fluke.  What is the correct way to sort these kinds of lists
correctly.

Thanks,

Phil

    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]