Bash Select Statement with Sed not working?

This is a sample select statement of bash given in the bash example and I am using this as a base and building another script. I am trying to run the script and when I run for the first time and if I choose any one of option of the vegetable then I should mark a "#" in front of the vegetable item on the menu.lst file which contains all the vegetables. So that next time when I run the same script the previous chosen vegetable will not show again using my grep filter of # on the select (see the script). The problem I am facing is I am trying to do an sed command prefix the selected vegetable with # symbol but it is not working even though I am inside the select loop. If I try from the command line and it is working perfectly. Here is the script any one can give me a pointer where the issue is is greatly appreciated. ---START of menu.sh--- #!/bin/bash PS3='Choose your favorite vegetable: ' # Sets the prompt string. echo select vegetable in `cat menu.lst | grep -v "^#"` do echo echo "Your favorite veggie is $vegetable." echo "Yuck!" echo sed 's/^$vegetable/#$vegetable/' < menu.lst > ffx && cp -fv ffx menu.lst; break done exit ---END of menu.sh--- ---Start of menu.lst--- beans carrots potatoes onions rutabagas ---End of menu.lst--- Below command Line works perfectly sed 's/^beans/#beans/' < menu.lst > ffx && cp -fv ffx menu.lst && cat menu.lst Thanks -Sylvester