in reply to search and replace strings in different files in a directory
Hi,
have a look at perldoc perlrun to see some ways of calling Perl to do some very convenient tasks on the command line.
In your case I'm pretty sure you can do your annoying job with:
perl -pi.bak -e 's{&}{&}g; s{&amp;}{&}g; s{\s>\s}{>}g; +s{\s<\s}{<}g;' *.xml
Regards
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search and replace strings in different files in a directory
by PitifulProgrammer (Acolyte) on Aug 13, 2014 at 10:51 UTC | |
by afoken (Chancellor) on Aug 14, 2014 at 19:16 UTC |