Table of Contents
Shell#
Linux#
find . -type f -exec perl -p -i -e 's/Masi/Bond/g' {} \;
Mac#
find . -type f -print0 | xargs -0 perl -p -i -e 's/Masi/Bond/g'
Posix#
sed 's/Masi/Bond/g' FILE > TMPFILE && mv TMPFILE FILE
Explaination#
- -p means print or die
- -i means "do not make any backup files"
- -e allows you to run perl code in command line
Linux.Shell - Mac.Shell