bin/15205: [patch] Addition to random(6)
Alexander Best
arundel at freebsd.org
Tue Aug 10 10:00:19 UTC 2010
The following reply was made to PR bin/15205; it has been noted by GNATS.
From: Alexander Best <arundel at freebsd.org>
To: Chip Camden <sterling at camdensoftware.com>
Cc: bug-followup at freebsd.org
Subject: Re: bin/15205: [patch] Addition to random(6)
Date: Tue, 10 Aug 2010 09:55:04 +0000
On Mon Aug 9 10, Chip Camden wrote:
> Quoth Alexander Best on Tuesday, 10 August 2010:
> > could you provide an example how to reproduce the same output (ls /bin | random -s 8) with an unpatched copy of ranom?
> >
> > cheers.
> > alex
> >
> > --
> > a13x
>
>
> Sure:
>
> ls /bin | random 8
i don't think this reproduces the exact ouput as `ls /bin | random -s 8`.
`random 8` will print each input line with a probability of 1/8th.
`random -s 8` on the other hand will print a random line out of every 8 lines of input. this means that for a static number of input lines `random -s 8` will always produce the same number of output lines, wheras the number of lines returned by `random 8` will be different for each run.
cheers
alex
ps: please keep bug-followup@ in the CC field so our conversation gets archived by GNATS.
>
> --
> Sterling (Chip) Camden | sterling at camdensoftware.com | 2048D/3A978E4F
> http://camdensoftware.com | http://chipstips.com | http://chipsquips.com
--
a13x
More information about the freebsd-bugs
mailing list