bash script loop through folders in directory code example
Example 1: bash loop over files in directory
#!/bin/bash
for filename in /Data/*.txt; do
...
done
Example 2: loop through directories bash
#loops only through directories
for d in */ ; do
echo "$d"
done
Example 3: for each folder in directory bash
for d in */ ; do
echo "$d"
done