Re: Why no /dev/one?

2003-02-05 Thread Michal F. Hanula
On Thu, Jan 30, 2003 at 12:25:00AM -0800, Darren Pilgrim wrote:
 Why isn't there a /dev/one device to provide an infinite number of 
 all-ones bytes?
And what about /dev/fortytwo? This is IMPORTANT.
mf

-- 
What do you care what other people think?



msg18170/pgp0.pgp
Description: PGP signature


Re: Why no /dev/one?

2003-02-05 Thread Tillman
On Wed, Feb 05, 2003 at 09:10:46PM +0100, Michal F. Hanula wrote:
 On Thu, Jan 30, 2003 at 12:25:00AM -0800, Darren Pilgrim wrote:
  Why isn't there a /dev/one device to provide an infinite number of 
  all-ones bytes?
 And what about /dev/fortytwo? This is IMPORTANT.

You can get that with with creative use of tail and /dev/twentyfour.

-T

-- 
When an ordinary man attains knowledge, he is a sage; when a sage attains
understanding, he is an ordinary man.
- Zen saying

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Roger Merritt
At 03:25 PM 1/30/03, you wrote:

Why isn't there a /dev/one device to provide an infinite number of 
all-ones bytes?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message

Sounds OK. As I've asked in a separate question to the list, would adding 
/usr/X11R6/bin to the PATH statement in /etc/rc be a Bad Idea (tm)?


--
Roger


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Why no /dev/one?

2003-01-30 Thread Giorgos Keramidas
On 2003-01-30 00:25, Darren Pilgrim [EMAIL PROTECTED] 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

- Giorgos

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Darren Pilgrim
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.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Why no /dev/one?

2003-01-30 Thread Jan Grant
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?

-- 
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 [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Adding /usr/X11R6/bin to the /etc/rc PATH (was: Re: Why no /dev/one?)

2003-01-30 Thread Giorgos Keramidas
On 2003-01-30 17:22, Roger Merritt [EMAIL PROTECTED] wrote:
 As I've asked in a separate question to the list, would adding
 /usr/X11R6/bin to the PATH statement in /etc/rc be a Bad Idea (tm)?

Yes, it would be a bad idea.

Is there need for anything under /usr/X11R6/bin while booting the
system?  If there isn't, then adding a path in /etc/rc that might
conflict with real executables and possibly hide problems if a program
happens to have the same name with something under the current PATH
but works differently, is a bad idea and a bug waiting to happen.

BTW: Please don't hijack irrelevant threads and ask something that is
not related to the original topic without changing the subject.  It
makes it difficult to sort through the original thread in most mailers.

Regards,
- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Giorgos Keramidas
On 2003-01-30 16:13, Ruben de Groot [EMAIL PROTECTED] wrote:
On Thu, Jan 30, 2003 at 11:53:05AM +, 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?

That's a good reason.  Nobody has written one, because nobody thought
there would be a good reason to have one.  Of course, patches that
implement something like that are always ok.  But then we'd have to
write kernel drivers for /dev/two, /dev/three and /dev/one-million-six
too and that's not a good idea :-(

 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 :)

Argh no! :P

This is even more easy with yes(1)

$ yes 'custom text' | head -3
custom text
custom text
custom text
$

/me hides in a corner to save himself from the evil tomatoes that are
probably heading his way by now :)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Ruben de Groot
On Thu, Jan 30, 2003 at 11:53:05AM +, 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 [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Mike Meyer
In [EMAIL PROTECTED], Ruben de Groot [EMAIL PROTECTED] typed:
 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 :)

Yes, but is /dev/pi a suitable substite for /dev/random if you seek
far enough into it?

mike
-- 
Mike Meyer [EMAIL PROTECTED]  http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why no /dev/one?

2003-01-30 Thread Jan Grant
On Thu, 30 Jan 2003, Mike Meyer wrote:

 In [EMAIL PROTECTED], Ruben de Groot [EMAIL PROTECTED] typed:
  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 :)

 Yes, but is /dev/pi a suitable substite for /dev/random if you seek
 far enough into it?

Only if you don't tell anyone exactly how far you're seeking, and if you
permit arbitrarily large file offsets. In that case, it's a source of
randomness (in that an observer who didn't know the file offset couldn't
predict with 100% accuracy the next digit)


-- 
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/
Roger Penrose can never be convinced that this sentence is true.
(If he doesn't get the joke, you can at least prove that he owes you money.)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message