How can I create an array consists of folder names? For example, I have set of folders with names A, B, C, and I want to create the array arr=(A B C).
I tried this:
arr=$(ls ~/Desktop/C\ study/seydtb )
But after that when I create files using this arr
for ((i=0; i<${#arr[@]}; i++)); do
touch ${arr[$i]}.sey
I get this:
A B C.sey
Only the last one has the .sey
suffix.