bash for loop selecting every file in directory code example Example: bash loop over files with extension for i in *.java; do [ -f "$i" ] || break ... done