I am using the following sed
command to replace some parameters in a config file:
sed -i 's/^option.*/option=value/g' /etc/fdm_monitor.conf
Now I have one problem. If the line does not exist, I want to add it to the bottom of the file.
I am calling this with a popen
out of a C program. I tried using awk
.