Re: [dev] situ — change files in situ

From: Troels Henriksen <>
Date: Fri, 13 Apr 2012 15:14:59 +0200

Strake <> writes:

> Hello all.
> I wrote a program to mutate files in situ by a given shell program,
> available here:
> I thought that it might be useful for some other folks here, ergo this mail.
> I wrote it to gain the functionality of GNU sed's -i switch in 9base sed.
> Unlike GNU sed's -i switch, it ought to work with any program.

I wrote a similar program in C: It
also does actual in-replace replacement (which is sometimes not what you
want). Note that you can also exploit shell evaluation order:

(rm foo && cmd... > foo) < foo

This will do an (almost) in-place replacement of foo.

\  Troels
/\ Henriksen
Received on Fri Apr 13 2012 - 15:14:59 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 13 2012 - 15:24:04 CEST