GNU bug report logs - #16061
Error in the message for src/shuf.c:73 in 8.22-pre3

Previous Next

Package: coreutils;

Reported by: Philipp Thomas <pth <at> suse.de>

Date: Thu, 5 Dec 2013 20:55:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 16061 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Philipp Thomas <pth <at> suse.de>
Cc: 16061 <at> debbugs.gnu.org
Subject: Re: bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3
Date: Thu, 05 Dec 2013 23:37:59 +0000
On 12/05/2013 08:54 PM, Philipp Thomas wrote:
> The description for the -r option for shuf in 8.22-pre3 reads:
> 
> "  -r, --repetitions         output COUNT items, allowing repetition.\n"
> "                              -n 1 is implied if not specified.\n"
> 
> Which is confusing as to what COUNT relates to.

Yes this could be clearer. So the point is that --repetitions
only makes sense in the context of a specified --head-count.

How about:

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c818a1e..5d49fef 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4923,7 +4923,7 @@ operation modes:

 @table @samp

-@item -n @var{lines}
+@item -n @var{count}
 @itemx --head-count=@var{count}
 @opindex -n
 @opindex --head-count
diff --git a/src/shuf.c b/src/shuf.c
index f7fc936..4d0ae90 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -76,8 +76,8 @@ Write a random permutation of the input lines to standard output.\n\
   -n, --head-count=COUNT    output at most COUNT lines\n\
   -o, --output=FILE         write result to FILE instead of standard output\n\
       --random-source=FILE  get random bytes from FILE\n\
-  -r, --repetitions         output COUNT items, allowing repetition.\n\
-                              -n 1 is implied if not specified.\n\
+  -r, --repetitions         allow repetition within a specified --head-count\n\
+                              which is assumed to be 1, if not specified.\n\
   -z, --zero-terminated     end lines with 0 byte, not newline\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);





This bug report was last modified 11 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.