By the way, you might want to replace
perl -pi -e 's/^<div.*>/<div>/' *.xml
with
perl -pi -e 's/^<div.*?>/<div>/' *.xml
As it was, it would match until the last ">" on the line.
In reply to Re: One-liner: -i without .bak?
by ikegami
in thread One-liner: -i without .bak?
by cryptoquip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |