Answers for "bash loop through directories and sub directory without find"

1

loop through directories bash

#loops only through directories
for d in */ ; do
    echo "$d"
done
Posted by: Guest on March-28-2020
0

Bash dir in loop

mkdir /tmp/A /tmp/B /tmp/C "/tmp/ dir with spaces"
for file in /tmp/*/ ; do file="${file%/}"; echo "${file##*/}"; done
Posted by: Guest on December-08-2021

Code answers related to "bash loop through directories and sub directory without find"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language