loop through all files in a directory shell script code example Example: bash loop over files in directory #!/bin/bash for filename in /Data/*.txt; do ... done