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

    


_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to