Well thanks, that was pretty educational. For the benefit of other
curious readers, I'm replying to your points with various examples,
which of course you probably don't need.
On Mon, 13 Aug 2007 00:02:59 -0400
Joey Hess <[EMAIL PROTECTED]> wrote:
> A. Costa wrote:
> > 1) Inelegant. The who
A. Costa wrote:
> 1) Inelegant. The whole pipe paradigm is so you can stick your
> filter anywhere in the pipe, and it'll do its thing. At
> present 'sponge' only works at the caboose, with filename.
This is a bug in /bin/sh.
> 2) The docs don't mention that '... |
Aha, this works:
% F=/tmp/nums ; seq 1 10 > $F ; wc $F ; cat $F | sort | sponge $F ;
wc $F
10 10 588895 /tmp/nums
10 10 588895 /tmp/nums
...that is if 'sponge' has a filename, and the invocation must be at
the end of the pipeline.
Still a bug, for the
Package: moreutils
Version: 0.22
Severity: important
% man sponge | grep DESC -nA 4
11:DESCRIPTION
12- sponge reads standard input and writes it out to the specified
file.
13- Unlike a shell redirect, sponge soaks up all its input before
opening
14- th
4 matches
Mail list logo