Re: Need blocking /dev/null

From: Ville Herva (vherva@niksula.hut.fi)
Date: Thu Nov 01 2001 - 02:27:10 EST


On Wed, Oct 31, 2001 at 07:11:47PM -0500, you [Doug McNaught] claimed:
> Riley Williams <rhw@MemAlpha.cx> writes:
>
> The Bourne shell is more perverse than you realize:
>
> $ exec 3>&1; find / -name "wanted-but-lost-download" 2>&1 1>&3 3>&- | eat
>
> [stolen from "Csh Programming Considered Harmful" by Tom Christiansen]

Wow. I actually played a minute with zsh, but didn't find a way... I was
pretty sure, though, that it was doable.
 
> Horrible, but does work. ;)
>
> > > zerofill | head -c 1440k > /tmp/floppy.img
> >
> > How does zerofill know when to stop writing zeros out?
>
> Easy, it gets EPIPE on the write (or gets killed by SIGPIPE if it's
> stupid).

Stupid... Or lazy ;).
 
> > > ssh foo@bar | block
> >
> > Which of my examples is this an equivalent to? I don't recognise it.
>
> None; he's referring to the /dev/block example that started the
> thread.

Yep.

> I'm still happy to keep /dev/null and /dev/zero. ;)

So am I. Perhaps it is better to let this thread die...

-- v --

v@iki.fi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:13 EST