Herself’s Webtools

Webtools for Webmasters: Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Herself’s Webtools header image 1

PERL script to find and replace every string in a sub directory

March 8th, 2007 · No Comments

This is a tool that enters a sub-directory and reads and changes one string to another.

I use it when I make major updates to my website or am updating links. I can have it search for the old link and replace it with the new link. (or any other piece of text you’d like to change).

It puts the altered files in the working directory and leaves the originals unchanged. It also prints to the screen the file name and line number of any changes made.

findAndReplace.pl

Tags: linux · osx · perl · tools

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.