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 '... | sponge | ...' is useless. > Better to return an error if there's no filename. It's not useless. It does what the man page says it does. Consider: svn diff | sponge | patch -R -p0 Here the whole diff is generated before patch is allowed to modify the same files that are being diffed. > 3) 'man sponge' states "...sponge soaks up all its input before > opening the output file..."; which implies standard output, The shell doesn't care when sponge opens stdout. As soon as it sees a redirection to a file, it will open, and zero, the file. -- see shy jo
signature.asc
Description: Digital signature