From owner-freebsd-questions Thu Jan 30 7:13:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A95937B401 for ; Thu, 30 Jan 2003 07:13:18 -0800 (PST) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3F5743F9B for ; Thu, 30 Jan 2003 07:13:12 -0800 (PST) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.6/8.12.6) with ESMTP id h0UFDeJi017553; Thu, 30 Jan 2003 16:13:41 +0100 (CET) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.6/8.12.6/Submit) id h0UFDdnN017552; Thu, 30 Jan 2003 16:13:39 +0100 (CET) Date: Thu, 30 Jan 2003 16:13:39 +0100 From: Ruben de Groot To: Jan Grant Cc: Darren Pilgrim , Giorgos Keramidas , questions Subject: Re: Why no /dev/one? Message-ID: <20030130151339.GA17486@ei.bzerk.org> References: <3E390FF3.5020706@pantherdragon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jan 30, 2003 at 11:53:05AM +0000, Jan Grant typed: > On Thu, 30 Jan 2003, Darren Pilgrim wrote: > > > Giorgos Keramidas wrote: > > > On 2003-01-30 00:25, Darren Pilgrim wrote: > > > > > >> Why isn't there a /dev/one device to provide an infinite number of > > >> all-ones bytes? > > > > > > > > > Because it's easy to get any sequence of equal bytes by using just > > > /dev/zero and tr(1). Try this command and check the output of hd(1) > > > :-) > > > > > > $ dd if=/dev/zero bs=512 count=1 | tr '\0' '\777' | hd > > > > What I was trying to get at was more a question of if there's some deep > > technical reason for the lack of a /dev/one beyond the triviality of > > flipping the bits in a pipe. > > Nobody's implemented it. It'd be trivial; but why would you want it? And while you're at it, what about /dev/yes and /dev/no to automate interactive scripts. Or, if you like the challenge, a /dev/fibonacci and a /dev/pi would be very welcome :) > > -- > jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ > Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ > I am now available for general use under a modified BSD licence. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message