Advanced Case Statement question ...
I have a question, I want to be able to do the following, but not sure if it is possible.
I want to create a case statement script that will generate the options that the user can pick by certain files in a directory listing.
For example ...
In the directory I have
report-Addition
report-Subtraction
report-cat
report-dog
so once the script starts, they will have the 4 following choices (addition,subtraction,cat,dog). However, if another file is added into the directory ... report-fish ... the next time the script is run, they will now have 5 choices (addition,subtraction,cat,dog,fish)
is it possible to make a case statement such as described above?
And if it is possible, then I could I use awk to cut away the "report-" before each word before it is displayed as options in the case statement?
I hope this all makes sense ...
I am not a linux expert so I am calling out for some help :P
Thanks!