Re: [dev] situ — change files in situ

From: Strake <strake888_AT_gmail.com>
Date: Fri, 13 Apr 2012 14:26:35 -0500

On 13/04/2012, Truls Becken <truls.becken_AT_gmail.com> wrote:
> You are right. I thought that since it only opens the output file
> after stdin is fully consumed, it would not touch the file on failure.
> The test below reveals that sponge leaves the file alone if the
> process is interrupted before end of stdin, but not if a program
> before it in the pipe returns non-zero.
>
> I guess I should test programs before suggesting them to others.

(^_^)

Actually, it's not wrong — it would do the job, i.e. to mutate file in
situ — it's just not quite sure enough.

Cheers,
strake
Received on Fri Apr 13 2012 - 21:26:35 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 13 2012 - 21:36:04 CEST