&#62; A separate program would clobber it.<p>Nope, you can check the return value from the program(s) run inside of it and revert to the backup file if there's a problem. You <i>really</i> don't need it to be handled specifically by sed.<p>There's actually an example script that does exactly that in _The Unix Programming Environment_, called 'overwrite', on page 154.