Search and Replace in Files

- 14 Jan 2008

Here is how to do a search and replace using Perl regex over a set of files:

perl -pi -e 's/source/destination/g' *.ext


Related Posts: Extracting Smarty variables from source » Installing vzdump on CentOS 5.4 (32-bit) » Dumping Addresses from phplist » Adding NRPE (Nagios) to CentOS \/ RHEL Servers » Adding the REMI Repository to CentOS / RHEL / RedHat »

comments powered by Disqus