/ Published in: Bash
Find and replace contents of files ending in .php with nothing. then append contents of template.php to all files in directory
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// find and replace all characters with nothing in files ending in .php perl -pi -w -e 's/.//g;' *.php // find and replace all line breaks with nothing in files ending in .php perl -pi -w -e 's/\n//g;' *.php // append contents of template.php to every file in directory for f in *; do cat ../template.php >> "$f"; done