bash loop all files in directory code example
Example 1: bash loop over files in directory
#!/bin/bash
for filename in /Data/*.txt; do
...
done
Example 2: bash loop over files with extension
for i in *.java; do
[ -f "$i" ] || break
...
done