lkml.org 
[lkml]   [2001]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Need blocking /dev/null
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/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.182 / U:7.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site