I'm trying to figure out how to replace some text in a config file even though I don't always know the full content.
For example:
[IP] 192.168.1.0
I want to change the IP value even though I may not know what it might be at the time.
I think SED is the way to do, but that only seems to deal with replacements where you know exactly what you are replacing:
sed -i -e 's/few/asd/g' hello.txt
Is there a way I can match on the [IP]
and switch out the line for a new one, even if I dont know what the value of the IP is?