I'm trying to wriet an installation script. In this script it appends the end of a text file with 36 lines of user defined parameters. Before it appends the file I need it to look for the same block of text and delete it, because the program will use the parameters defined first in the file. I would just delete the parameter file first and rewrite it, but there are other parameters defined in it that can't be deleted.
Here is the basic layout of the section that appends the parameter file.
I'm pretty new with shell scripting, and am lost at this point.
Here is the basic layout of the section that appends the parameter file.
Code:
echo "#~~~ Begin Program Parameters" >> parameters ;
echo "VARIABLE1 = value1" >> parameters ;
echo "VARIABLE2 = value2" >> parameters ;
echo "Enter the value for VARIABLE3";
read value3 ;
echo "VARIABLE3 = $value3" >> parameters ;
echo "#~~ End Program Parameters" >> parameters ;
I'm pretty new with shell scripting, and am lost at this point.