bash scripting loop over directories 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