so there is "vi" command given for the file. so in this case the code for editing only the "section_a" of the configuration
sed -n '/SECTION_A/,/SECTION_B/p' < sample1.txt >test.txt
UNEDITED=`cat test.txt`
vi test.txt
EDITED=`cat test.txt`
echo "$EDITED"
echo `sed s/$UNEDITED/$EDITED/ sample1.m`
so in some sense i want to edit specific section of configuration file. save it it temp file. and then updated the edited section.
The whole point of going through this exercise was to give user chance to update only the section he wants and hiding the rest of configuration temporarily.