Need to write a script, that choose one subdirectory in directory to use it.
I see it in this way.
This is /SampleDir/ and it has /SubDir1/, /SubDir2/ and /SubDir3/
User enter the directory location, program search it and give to user list of SubDirectories in this Dir, user choose with exactly subdir he want to work just click the number of list:
Code
echo "Сhoose Directory:\n"
read SOMEDIR
// #check nubmber of subdirs
echo "In directory you have multiple subdir's, which one do you want to use"
// #choose subdir
// #Any operation, like Remove SubDir
- And same in Terminal
Choose Directory:
input: /root/Documents/SampleDir/
In directory you have multiple subdir's, which one do you want to use:
1)SubDir1
2)SubDir2
3)SubDir3
Input: 1
Thanks a lot