Perl String Replace Script

Joel Madero jmadero.dev at gmail.com
Tue Jun 12 15:16:26 PDT 2012


Just a small script for anyone who wants it. Running it in terminal allows
you to search all files in a directory (recursively) and replaces a string
with another string. It also creates a backup (FILENAME.save) of any file
changed. I'm using it to replace object names when needed.

Credit goes to this person who did the real thinking, I just scripted it
because I didn't want to memorize the text of what he came up with:
http://forums.devshed.com/unix-help-35/unix-find-and-replace-text-within-all-files-within-a-146179.html


Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120612/2419ad0f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perl_string_replace.sh
Type: application/x-sh
Size: 462 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120612/2419ad0f/attachment.sh>


More information about the LibreOffice mailing list