I want to be able to display files under a given directory, then select one of the files and be able to delete it.Here's what I've found so far. Can anybody help?let i=0 # define counting variableW=() # define working arraywhile read -r line; do # process file by file    let i=$i+1    W+=($i $line)done < <( ls -1 /home/admin/Desktop )FILE=$(dialog --title List file of directory /home --menu Chose one 24 80 17 ${W[@]} 3>&2 2>&1 1>&3) # show dialog and store outputclearif [ $? -eq 0 ]; then # Exit with OK    readlink -f $(ls -1 /home | sed -n `echo $FILE p | sed 's/ //'`)fi
dialog menu to display files, select one of them and then able to delete it
shell script;files;dialog