The provided bash script to update an option file works, but it's not very clean, the line number are determined by the default option file and used as a guide to update the target file. This method, sometime, put the new lines in strange places, making the option file harder to read.
The idea here is to design a python script with the capability to rebuild an option file using another one as a template. By using an object, it would be possible to define different sections to the option file in the script and the printing function would show a perfectly aligned output.
The provided bash script to update an option file works, but it's not very clean, the line number are determined by the default option file and used as a guide to update the target file. This method, sometime, put the new lines in strange places, making the option file harder to read.
The idea here is to design a python script with the capability to rebuild an option file using another one as a template. By using an object, it would be possible to define different sections to the option file in the script and the printing function would show a perfectly aligned output.