Frederik Eaton <[EMAIL PROTECTED]> writes:

> I've given many examples - can you give an example of a situation
> where people would put (a) differently-formatted numbers in a column
> of a file (how would they become differently-formatted?) and then sort
> randomly based on their values, (b) insisting that ties stay together?

No, but that's because I don't know what the phrase "sort randomly
based on their values" means.  If it's really a random process, it
will ignore their values; then it's not a sort at all.

> When you want to rearrange lines of a file, you turn to one command
> - sort.

No, it depends on what sort of rearrangement I want.  If I want to
reverse the file, for example, I'll use "tac".

> you might want to sort on one key and randomize on another

That can be done easily by combining "permute" and "sort", no?  You
permute the input, then use a stable sort on the key that you want to
sort by.

> none of the existing programs handle large files as well as 'sort'
> does.

"tac" does.

>> That's OK in many applications.  (You have 30 black balls and 20 white
>> balls in an urn, and want to select 7 balls without replacement....)
>
> OK, after some thought I agree with you. Do you think it would be too
> confusing to have both alternatives available?

It'd be nicer if we had just one alternative.  And it's pretty easy:
just do "sort -u | permute" if you want to avoid duplicates.

So I still don't see why this functionality should be part of "sort".


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

Reply via email to