I have a bash script that is being written to a file. at the end of the script, I want to display a menu with line numbers - and the user will be able to select 1 or 2 (etc. up to the number of lines in the file), then execute this line.
Perfect before that.
However, after the line is executed (say, for example, it displays a different file.) I would like to return to the menu and let the user select a different number. Including zero to exit the menu.
After displaying the menu, I have the following. (dumpline - line of the read file)
dresult=`sed -n "$dumpline"p "$PWD"/"$myday1"_"$myjob".txt`
$dresult
But right now - after running the $ dresult variable - it leaves the shell (instead, I want the menu to display.
Any thoughts?
thank you in advance.