I'm trying to script some changes I need to make to a couple of config files. It's worth mentioning that I'm an expert with neither sed nor awk, though I'm far better with sed.
Right now, I'm doing:
sed '/setting.name/c setting.name: newvalue' </etc/foo.conf >tmpfile.tmp && mv tmpfile.tmp /etc/foo.conf
But surely there's a better way? Perhaps with awk?