bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] Makes sort create random order


From: Felipe Kellermann
Subject: Re: [PATCH] Makes sort create random order
Date: Sat, 29 Jan 2005 20:41:41 -0200 (BRDT)
User-agent: Pine <http://www.washington.edu/pine/>

On Thu, 27 Jan 2005 10:21pm  -0700, Bob Proulx wrote:

> A friend introduced me to that trick a few years ago and I have been
> using it ever since.  $RANDOM is a ksh/bash specific feature.  It is
> not POSIX but is widely available.

I think my commentary on this is a bit off-topic here, but your message 
reminds me of a dream I have for a long time: Having BSD jot implemented 
in coreutils.  That would overlap some features of seq, so a possibility 
would be to implement some of the ideas of jot in seq (and I'd really like 
to contribute with this).

I'd like to hear opinion of other on this subject.

For instance, implementing jot's `-r' in seq, we could employ the 
traditional "$RANDOM" trick this way:

glacius:~ felipek$ printf "This\nis\nan\nexample\n" > list
glacius:~ felipek$ jot -r 4 | paste - list | sort | cut -f 2-
an
example
is
This
glacius:~ felipek$

Here I'm using Darwin 7.7.0.

-- 
Felipe Kellermann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]