Revision: 59756
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 27, 2012 23:32 by zlincoln
Initial Code
// 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
Initial URL
Initial Description
Find and replace contents of files ending in .php with nothing. then append contents of template.php to all files in directory
Initial Title
Batch file content replace from template.php
Initial Tags
Bash, unix, perl
Initial Language
Bash