Wrapping pages in a Dreamweaver template
This is a one-liner to add a very simple Dreamweaver wrapping template to all html/php files in a directory and all child directories. You’ll need to add a template called “template.dwt” with one editable region called “Content”. After you do this, you can make changes to the template and all of the files will be updated with the template changes. Of course, it’s also a model for a general universal string replace.
find . -type f \( -name “*.htm” -o -name “*.html” -o -name “*.php” \) -print0 | \
xargs -0 \
perl -p -i.bak \
-e ’s|||g;’ \
-e ’s|
-e ’s|>|‘ \
-e ’s|>>|
Comments Off