Hi,
I would like to construct an interactive prompt for a series of bash shell scripts. This prompt will ask the user a series of questions, and the answers will determine which scripts are run, and in which order.
I am familiar with the "read" command, and have successfully constructed a simple prompt. However, due to the inherent nature of shell scripts, the prompt is only capable of going forward; ie question #1 is asked, and once an answer is entered, question #2 is asked. The user is not able to then go back to question #1, unless he/she quits and starts over.
Does anyone have any ideas on how to do this? Is there a command that orders the shell to jump backward/forward to a specific line number of the script? My thought is that if the user enters for example "b" (for back), the shell would then skip so many line #'s back in the script to where the previous question was asked. Any other ideas?
Thanks for any help,
Mike