I am trying to make a BASH script to test the files in the working directory and return the files that are directory files.
One approach that I can think of is, starting with ls and feeding the output into test -d.
I'm not sure what sort of looping would be best for testing each variable. And, how I can design the loop so that it can handle an unlimited amount of input from ls, not just designed for a maximum of say 20 variables.