uniq: missing option -W / --check-fields=N

2006-06-21 Thread Matt Keenan

Greetings all,

uniq(1) used to have an option for checking only a certain number of 
fields. I have since noticed that some scripts I wrote some time ago 
have stopped working because the -W / --check-fields=N option has 
disappeared. Can it please be put back in? I am happy to write a patch 
to do so if no-one else wants to do it. Is there a reason why it 
disappeared?


Matt



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: uniq: missing option -W / --check-fields=N

2006-06-22 Thread Matt Keenan


Eric Blake wrote:
uniq(1) used to have an option for checking only a certain number of 
fields. I have since noticed that some scripts I wrote some time ago 
have stopped working because the -W / --check-fields=N option has 
disappeared. Can it please be put back in?



It's still there in the latest stable version, 5.96:
$ uniq --version | head -n1
uniq (GNU coreutils) 5.96
$ uniq --help | grep check
  -w, --check-chars=N   compare no more than N characters in lines

  

not --check-chars=N, I'm talking about --check-fields=N.
I am happy to write a patch 
to do so if no-one else wants to do it. Is there a reason why it 
disappeared?



Probably because you switched systems or PATH, and are no
longer using the GNU coreutils version of uniq.

  


I upgraded recently from Debian Sarge to Ubuntu Dapper, and I noticed 
that the -W (note the caps!) flag had disappeared. Maybe it was a Debian 
distro patch. Paul Eggert has mentioned that upstream uniq has never had 
a -W flag. Would you be receptive to a patch? I'm happy to write one.


Matt



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: uniq: missing option -W / --check-fields=N

2006-06-23 Thread Matt Keenan


Paul Eggert wrote:

Matt Keenan <[EMAIL PROTECTED]> writes:

  

Paul Eggert has mentioned that upstream uniq has never had a -W
flag. Would you be receptive to a patch?



I'm not sure.  Does any distribution other than Debian-derived
distributions have it?  More importantly, what's it used for and
useful for?
  
The main purpose is so that checking can be done against fields as 
opposed to just characters (think of fields that have an inconsistent 
number of characters). The use I have for it is to get the final count 
for the number of pages for a given CUPS job from the CUPS page_log 
file. Making a patch from the debian sources is not a difficult task and 
I can provide one if necessary.


Matt



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: uniq: missing option -W / --check-fields=N

2006-06-26 Thread Matt Keenan

Jim Meyering wrote:

[snip snip]
  
I agree, and think I wrote exactly the same thing: uniq needs the same

-k key-selection options as sort -- probably in response to a request
to integrate the Debian patch.  I went to look for it a couple days ago,
but got side-tracked.
  


I am happy to write a patch. Just a quick note, I would have thought 
that the Debian patch was released under a GPL license, and hence I 
wouldn't need to request permission (as the permission was already 
granted by the license). I will check the license anyway before I check 
the code and do a clean room implementation from scratch if necessary..


Matt



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils