Perl

From Teknologisk videncenter
Revision as of 19:14, 18 June 2010 by Heth (talk | contribs) (Search and replace in files)
Jump to: navigation, search

Package wordprocessing.png Under Construction

One liners

Search and replace in files

You could also use find and sed.

perl -pi -w -e 's/SEARCH/REPLACE/g;' *.php
  • e means execute the following line of code.
  • i means edit in-place
  • w write warnings
  • p loop