To prepare to replace some text in batches on the Mac, use the sed command, as follows:
sed -i 's/xxx/yyy/g' file
The same command can be successfully run on Linux, pay attention to the description of the -i parameter in man sed under Mac:
It turned out to be a Mac's backup requirement, alright! Then do it like this:
sed -i '' 's/xxx/yyy/g' file