NetBSD-Bugs archive

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

Re: bin/45123: sort(1) -k field descriptions should take +[0-9]



The following reply was made to PR bin/45123; it has been noted by GNATS.

From: Jukka Ruohonen <jruohonen%iki.fi@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: netbsd-bugs%NetBSD.org@localhost, jkoshy%users.sf.net@localhost
Subject: Re: bin/45123: sort(1) -k field descriptions should take +[0-9]
Date: Thu, 7 Jul 2011 22:36:30 +0300

 On Thu, Jul 07, 2011 at 04:55:02PM +0000, David Laight wrote:
 >  On Thu, Jul 07, 2011 at 12:35:00PM +0000, jkoshy%users.sf.net@localhost 
 > wrote:
 >  > >Number:         45123
 >  > >Category:       bin
 >  > >Synopsis:       'sort -k +3' should work.
 >  
 >  At a guess this is due to the way that the traditional 'sort +3' is 
 > converted
 >  into a '-k xxx' option prior to the fixed argv being passed to getopt().
 
 Hmm. On 5.1:
 
        $ sort -k +3 
        sort: field numbers must be positive
 
 But on 5.99.54:
 
        $ sort -k +3
        a b c
        d d a
        a b x
        d d a
        a b c
        a b x
 
 So it seems to work.
 
 - Jukka.
 


Home | Main Index | Thread Index | Old Index