I'm trying to figure out the best way to script a command to search all text files on a server for a string (IP address) and replace it.
The closest I've gotten is this... but its not working
grep -rl '192.168.111' ./ | xargs sed -i 's/192.168.111/192.168.121/g'
Basically, I want to find instances of '192.168.111' and replace it with '192.168.121'
Thoughts?
The closest I've gotten is this... but its not working
grep -rl '192.168.111' ./ | xargs sed -i 's/192.168.111/192.168.121/g'
Basically, I want to find instances of '192.168.111' and replace it with '192.168.121'
Thoughts?