i just started shell programming and i can't get the following problem to work.I want that all directorys, from a defined directory (e.g.. /var/www/user), are displayed in dialog checklist. I also want that in the selected folders, get stored a previously defined variable (in every folder the same).Does anyone have a solution for the problem?edit//This is an working example. The problem is, every time i add a folder in the directory (e.g.. folder4) i have to edit the script.while truedoClientens=`dialog --backtitle Script --title Menu \        --checklist  Select 0 60 0 \        folder1  off\        folder2  off\        folder3  off 3>&1 1>&2 2>&3`clientsantwort=$?if [ $clientsantwort = 1 ]; then     clear    exitficase $Clientens in'folder1')        echo type=$mtype&text=$message >/var/www/users/folder1/msg/msg.txt        break        ;;'folder2')        echo type=$mtype&text=$message >/var/www/users/folder2/msg/msg.txt        break        ;;'folder3' )        echo type=$mtype&text=$message >/var/www/users/folder3/msg/msg.txt        break        ;;        *)        ;;esac
ls command in a variable to display in dialog checklist and processing of the selected option
shell script;directory;dialog