Is there a reason why all of these examples of linux find and replace in multiple files use find and grep to pipe into sed or perl. Why not just use sed or perl directly with something like this?
sed -i 's/echo/burnbaby/g' booboo*
linux\ find\ and\ replace\ in\ multiple\ files - Google Search ie=utf-8&oe=utf-8&aq=t&rls={moz:distributionID}:{moz:locale}:{moz: official}&client=firefox
sk1418
September 14, 2011, 7:39am
2
grep or find is only for narrowing the selection.
pludi
September 14, 2011, 7:55am
3
Just using wildcards in the command line works usually, but it breaks under any of these conditions:
If you want to apply more than 1 command
If the files where the command should be applied aren't all in the same directory
If there are too many files to fit on 1 command line
If you want to avoid "is a directory" error messages should a directory have a similar name as the files you want to modify