What I want to do is to get a list of folders under a directory and make each folder its own variable. Here is what I have so far.
Code:
# Get the list of folders.
count=0
varcount=0
cd $webroot
for i in */; do
basename=`basename "$i"`
let count=count+1
let varcount=varcount+1
varcount=$count
basename2="$basename2 $basename "
done
PS3="Pick 1 of the $varcount $group web folders?: "
select group in $basename2
do
break
done
echo $basename2
exit 1
$basename2 is the result with all the folders with spaces in between. I was hoping that I could pick a number and select that folder.