I'm new with shell programming.My goal is to give the user a selection which file should be run.I catch all available scripts in one var with:var=$(find script*)so far so good, this is the output:    echo $var    script1 script2 script3 scr...now I want to store each file in a singel variable to run it in later selectionselect SEL in script1 script2 script3 ..........case $SEL in        $Script1) echo ($Script1 will start) && ./$script1 ;;        $Script2) echo ($Script2 will start) && ./$script2 ;;        $Script3) echo ($Script3 will start) && ./$script3 ;;        $Sc..) echo ($Scr.... will start) && ./$scrip.... ;;        $Sc...) echo ($Sc...... will start) && ./$scrip..... ;;        *) echo choose on of the availabel files;;    esacdoneI don't have a clue how should I should separate all files if I don't know how many and the exactly length of each file.I tried to split with echo ${var[1]} and echo $var[1] but this dosn't work. I recive either a empty output or the whole string.
list files and store it in variables
shell;shell script;variable