Need Part of a Bash Script take input/generate array of menu choices/take user selection/appoint value...
Posted on 2009-04-08
I have inherited a task to complete a deployment script -
It needs to query the user for a string in order to narrow down the choices of directories that were ftp or scp up to the server.
Based on the user input a partial directory list is returned of a local directory with the matching string request - this partial (or say full return if a very broad search (like just the letter a for example) needs to return to the user as input choices - aka like
1 - directory1
2 - directory2
3 - directory3
the array choices also need to be able to handle spaces and linux allowable special characters in the name