array=${ls -d */} echo ${array[@]}
I have three directories: ww ee qq. I want them in an array and then pr
ww
ee
qq
This would print the files in those directories line by line.
array=(ww/* ee/* qq/*) printf "%s\n" "${array[@]}"