From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 10 15:30:06 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 793A3106564A for ; Tue, 10 Aug 2010 15:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1728FC1F for ; Tue, 10 Aug 2010 15:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7AFU6DQ061927 for ; Tue, 10 Aug 2010 15:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7AFU6p5061918; Tue, 10 Aug 2010 15:30:06 GMT (envelope-from gnats) Date: Tue, 10 Aug 2010 15:30:06 GMT Message-Id: <201008101530.o7AFU6p5061918@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Chip Camden Cc: Subject: Re: bin/15205: [patch] Addition to random(6) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chip Camden List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2010 15:30:06 -0000 The following reply was made to PR bin/15205; it has been noted by GNATS. From: Chip Camden To: Alexander Best Cc: bug-followup@freebsd.org Subject: Re: bin/15205: [patch] Addition to random(6) Date: Tue, 10 Aug 2010 08:26:23 -0700 --ftEhullJWpWg/VHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Alexander Best on Tuesday, 10 August 2010: > 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 /bi= n | random -s 8) with an unpatched copy of ranom? > > >=20 > > > cheers. > > > alex > > >=20 > > > --=20 > > > a13x > >=20 > >=20 > > Sure: > >=20 > > ls /bin | random 8 >=20 > i don't think this reproduces the exact ouput as `ls /bin | random -s 8`. >=20 > `random 8` will print each input line with a probability of 1/8th. >=20 > `random -s 8` on the other hand will print a random line out of every 8 l= ines 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. >=20 > cheers > alex >=20 > ps: please keep bug-followup@ in the CC field so our conversation gets ar= chived by GNATS. >=20 > >=20 > > --=20 > > Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F > > http://camdensoftware.com | http://chipstips.com | http://chipsq= uips.com >=20 >=20 Ah, you are correct. I missed that subtle difference. >=20 > --=20 > a13x --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://camdensoftware.com | http://chipstips.com | http://chipsquips= .com --ftEhullJWpWg/VHq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iQEcBAEBAgAGBQJMYW+fAAoJEIpckszW26+RMAkH/13LNyxpAtYxqk2N2Fl+hSfe t19KEgCc8v7je7J/V6Ok5YjKvOd5055NcybBZ50xtsEhgokOcchBDqoCERPtBDKW fGWr5PTgYzZ6HtjAM5/44Uy3JR3iQvb+aRJiYIdqrVsWyZ53YktApr5fdBe5w9jh 4GiIQUsvcOzKVN4OWooJgyZWCVf9En2kwL6xK0TmR8EQLpcZWvgCAdHeC8EhzMz1 fRTCEKTIkaXJLO8CEPepPsowE1/AX+kyRAILcWqNR/4NNkZMXiA9Y/Csf5OFiAfJ tLNk1GnKxKapgUyAxaxr2kM6OU8tjeSuy8mePbwGP3UnsVfYwoS9LiPf6CRcsjo= =o/4t -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq--