User Tools

Site Tools


tips:linux:replacetxtinfiles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tips:linux:replacetxtinfiles [2009/06/08 15:50] (current)
erik created
Line 1: Line 1:
 +====== Search & Replace Text Accross Multiple Files ======
  
 +You can use Perl to quickly search and replace text across multiple files. For example to replace foo with bar all text files:
 +
 +  perl -pi -w -e '​s/​foo/​bar/​g'​ *.txt
 +
 +as seen [[http://​www.liamdelahunty.com/​tips/​linux_search_and_replace_multiple_files.php|here]].
tips/linux/replacetxtinfiles.txt · Last modified: 2009/06/08 15:50 by erik