[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3
From: |
Bernhard Voelker |
Subject: |
bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3 |
Date: |
Fri, 06 Dec 2013 02:36:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
On 12/06/2013 02:26 AM, Bernhard Voelker wrote:
> On 12/06/2013 02:13 AM, Pádraig Brady wrote:
>> I suppose we could make -r require that -n is specified,
>> but I'm not sure.
>
> Regarding this in the above context - no, because then you would
> have to specify -n1 when "picking 1 random item". Saving the user
> from typing -n1 seems to be _the_ reason for assuming n=1.
OTOH there may be cases where you don't know the number of items
beforehand, but you want shuf to output that number of random items
from the input regardless of repetitions:
$ gen_data | shuf -r
Shuf will know the number of elements and may easily pick that
number incl. repetitions.
If you want to pick just one, you know it and it's easy to say -n1,
but it's not that easy in the above case.
Have a nice day,
Berny
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Philipp Thomas, 2013/12/05
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Paul Eggert, 2013/12/06
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Pádraig Brady, 2013/12/06
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Bernhard Voelker, 2013/12/06
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Pádraig Brady, 2013/12/06
- bug#16061: Error in the message for src/shuf.c:73 in 8.22-pre3, Bernhard Voelker, 2013/12/06