# Change input field separator from default space, restore when done
IFS=$(echo -en "\n\b")
for SUBDIR in `ls -d1 */`
echo "Testing: $SUBDIR"
Kinda in a hurry, saw this on a drive-by, sorry it's not complete.
Probably use sed to fix whatever else within the for loop.