This adds a naive implementation of sponge(1) to base.
sponge(1) is useful in pipelines to write to files read earlier without
setting up a temporary file inline
Differential D12900
Add sponge(1) eadler on Nov 1 2017, 7:55 PM. Authored by Tags None Referenced Files
Details
This adds a naive implementation of sponge(1) to base. sponge(1) is useful in pipelines to write to files read earlier without
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions I like it. This looks great, but I'm concerned about performance for larger files since realloc copies data and can wind up with a fragmented heap that might artificially limit what you can do. Simple lists of ranges would suffice to avoid these copies without greatly increasing the complexity of the code.
Comment Actions An alternative implementation would write to a temporary file, then rename onto the destination once stdin closes. This is how ksh93's >;pathname redirection works (this does not mean I think this definitely should be done like that, or that the shell is the best place to implement this feature).
Comment Actions Some more style(9) issues...
Comment Actions almost there...
|