// /find-search-and-replace-text-from-command-line-in-multiple-files-linu

Find (search) and replace text from command line in multiple files (Linu

Another (and more easy) way to change text in multiple files is to use grep: grep -lr -e 'oldtext' * | xargs sed -i 's/oldtext/newtext/g' or to use PERL: perl -p -i -e ’s/oldtext/newtext/g’ *

Another (and more easy) way to change text in multiple files is to use grep:
grep -lr -e 'oldtext' * | xargs sed -i 's/oldtext/newtext/g'

or to use PERL:
perl -p -i -e ’s/oldtext/newtext/g’ *

 
IT-Digest AI Assistant