You have just broke up with Cyntia and you rather fancy Jane now.
Your Documents directory is full of those romantic love letters that worked so well with Cyntia.
So in Cyntia1.txt you put:
Cyntia I love you
In Cyntia2.txt
You are the best Cyntia
Etc etc. So to avoid doing all that hard work again you can do the following in your Documents directory:
Code: Select all
perl -i -pe 's/Cyntia/Jane/;' Cyntia*
And voila in all files starting with Cyntia "she" will be replaced with Jane.
You can also replace Cyntia in the text with a sentence like this:
Code: Select all
perl -i -pe 's/Cyntia/Jane I love you/;' Cyntia*
What a great party trick! ... If that doesn't get you the girl nothing will!
LibreOffice is somewhat unromantic though and registers that the odt file has been manipulated. You get the offer to "fix" it and thus you are stuck with Cyntia.
Works great on text files though.