News for hackers. Stuff that matters.
Re:Introduction to sed by telemachos on Friday October 07, 2011 @06:46PM (#3086311)
Rather than -i alone, I always use -i.bak (or whatever you prefer instead of '.bak'). That way, you get (1) in-place editing and (2) a backup. The files you work on are backed up to "file.bak", so that if you make some simple regex mistake with huge negative consequences, you have a ready fix. (And if you do things perfectly, it's easy to run "rm *bak" after you confirm that.)

There are no comments on this comment yet.