Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Attachment: perl_string_replace.sh
Description: Bourne shell script


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.