Strake <strake...@gmail.com> writes: > Hello all. > > I wrote a program to mutate files in situ by a given shell program, > available here: > http://strake.zanity.net:1104/situ/ > > 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: http://sigkill.dk/projects/insitu/ 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