This project was forked from the following Github repository: Linux-str_replace, because the raw script file is used directly from my projects:
Thanks @Samir-Al-iraqi for the script, because it solved my problem when trying to replace a substring within a file, in which I could't solve it using sed and perl commands.