Replace text inside a file

February 27, 2004

To replace all occurances of “shtml” with “php” inside of all of the *.php files in a directory.
$ perl -pi.bak -e 's/shtml/php/' *.php
See: hacks.oreilly.com: Global Search and Replace with Perl for more examples.

You Don’t Need Another Sales Call. You Need an Answer.

30 minutes. No pitch. Just an honest conversation about where you are, what you need, and whether working together makes sense.

We use your details only to set up and prepare for the call. Privacy policy.