If you work in the web hosting industry, I’m pretty sure you encountered situations when you have to search and replace a string in multiple files.
As a practical example, maybe you have to search for an old IP (220.127.116.11) in all the DNS zones of your server and replace that IP with a new one (18.104.22.168). Well, it might sound complicated, but with a simple command, you can do this in seconds:
find /path/to/directory -name "*.txt" | xargs perl -pi -e 's/22.214.171.124/126.96.36.199/g'
Of course, you have to replace the path where all those files are located, the extension of the files on which you want to make the replacement (or you can simply use * if you want to replace in ALL kind of files) and the IPs with your own.
NOTE: is not necessary to replace numbers only, it works for any kind of strings.
I hope it helps 🙂 Cheers!