perl -pi.bak -0 -e 's/(.*)/prepend\n$1append\n/s' *.html
This works by using the -p switch to set up a loop around the contents of each file and the -0 switch to set the end of line terminator ($/) to null. Then you can peform a regex on the entire file as one big string.
In reply to Re: In-place header/footer
by perrin
in thread In-place header/footer
by swiftone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |