Thanks for the help so far
The "done" I put in due to pure desperation since what I was trying simply wasn't working.
There are more than one instance of both "Text" and "#Text" in the file.conf, but the values Page1.html, Page2.html, Page3.html and Page4.html are all unique.
Basically I want this portion of script to run first, then a second portion allowing you to choose which page (page1.html or page2.html etc.) you want to have commented out. My second portion of script works pretty good, but the one problem I have is that if there is nothing to comment out my script will leave the entry in file.conf as it is (for example "Text...") which is fine. When the sample is already "#Text", it will add another (for instance "##Text").
This is basically to allow me to see which are commented out and which aren't so that the second portion of the script will be based on this portion's information.
So this script will feature in another long script, first showing you which entries are commented out and which aren't, then giving you an option of which entry you want to comment out/ enable, then perform your selected action, restart a service if you choose to, then exit.
Ah, OK! I see now I left out the "elif then
" bit! Still learning I guess, thanks for everyone's help, you're all super!