Replace using Perl

22 marzo 2008 at 11:51

Fecha Filed in Computers
Tags Tags: , ,

This tip probably seems a bit stupid, but I have always found very useful. If we want to replace a string in a file with another string, we can do it easily using Perl:

perl -p -i -e 's|old_string|new_string|' file.xml

Of course, if we need to apply it to several files we can use a wildcard character.

Comments Comments (3) Replace using Perl Permalink Votar: Positive 1 Negative 1