Using Perl to Replace Text in Multiple Files
You can search and replace text inside multiple files using Perl. This is how you do it:
$ perl -i -pe 's/Windows/Linux/;' test*
This command will search for the word ‘Windows’ inside all files that begin with ‘test’. When it finds one, it will substitute it with the word ‘Linux’. This is useful if you have multiple files that contain the same text. Remember that you can use regular expressions to make searching flexible.
Related Posts
Post comment
Search PinoyTux
Subscribe to Email Feeds
Blog Lounge
Popular Posts
Recent Posts
Drop your Card Here
Recent Comments
- chyrica
on Cebu Pacific Sucks - chyrica
on Cebu Pacific Sucks - wallpat
on Cool Ubuntu-Filipino Wallpapers - celebrity fuck you
on Diablo 3 Coming Soon - Dakbayani
on Bayanihan Linux: True Blue Pinoy Linux








