I have a bunch of git project that mostly have similar folder structure but not always.
config of these git project is what interests me, most configs can be found in
/var/www/*/www/.git/config
In the config files, a lot of projects have an IP address set in the remote origin section instead of a domain.
Now I want to edit all .git/configs that have a string IP with a domain (or another IP) all at once.
I tried with sed and gave it the /var/www/*/www/.git/config as a file but that doesn't work because sed doesn't edit the file and save it, it only outputs the change. I need something that will go into every .git/config and replace a string and immediately save the file.
Possible a bash script is in order for this.