Bash Loop по файлам в каталоге
#!/bin/bash
for filename in /Data/*.txt; do
...
done
The Code Doctor
#!/bin/bash
for filename in /Data/*.txt; do
...
done
# Basic syntax:
for filename in `cat file_of_filenames.txt`; do
echo $filename
done
# This iterates through each of the filenames listed in the
# file_of_filenames.txt
# Note, the filenames should be separated by spaces or new-lines