I am stuck with a question like this..
Write a shell script select loop that lists each file in the current directory and enables the user to view the file by selecting its number.
In addition to listing each file, use the string Exit Program as the sentinel key to exit the loop.
If the user selects an item that is not a regular file, the program should identify the problem as The entered name is not a regular file.
If no input is given, the menu should be redisplayed.
In this problem, I can list each file but, I don't know how to write the code which enables the user to select its number, and the Exit Program is something like
if...
exit o
but I am not sure