Julian
0
Q:

for loop in bash for files

#!/bin/bash
for filename in /Data/*.txt; do
    ...
done
9
#!/bin/bash
FILES=/path/to/*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  cat $f
done
0

New to Communities?

Join the community