http://qs321.pair.com?node_id=497694


in reply to Word replace - notetab light vs perl

This is why I like sed ;-)

$ sed -i 's/wrongs/wrongs3/' wrongs
--
b10m

All code is usually tested, but rarely trusted.

Replies are listed 'Best First'.
Re^2: Word replace - notetab light vs perl
by itub (Priest) on Oct 05, 2005 at 18:37 UTC
    I usually do it like this:

    $ perl -i -pe 's/wrongs/wrongs3/' wrongs

    This is good if you don't have a recent version of GNU sed (only those have the -i option). I use it often enough that I have alias pp="perl -i -pe".