title: Bash Menu: Return to menu after selection made and executed?
body: <p>I've got a bash script that writes to a file.  at the end of the script I want to display a menu, with line numbers - and have the user be able to select 1 or 2, (etc. up to the number of lines in the file) then have it execute that line.</p>
  
  <p>Up to here is perfect.</p>
  
  <p>However, after the line is executed (say for example it displays another file.)  I'd like to return to the menu and let the user select another number.  Including zero for exiting the menu.</p>
  
  <p>Once the menu is displayed I have the following.  (dumpline being the line of the file read)</p>
  
  <pre><code>     dresult=`sed -n "$dumpline"p "$PWD"/"$myday1"_"$myjob".txt`
       $dresult
  </code></pre>
  
  <p>But right now - after running the variable $dresult - it exits the shell (where instead I'd like the menu displayed.</p>
  
  <p>Any thoughts?</p>
  
  <p>thank you in advance.</p>