Answers for "for loop in bash for files"

15

bash loop over files in directory

#!/bin/bash
for filename in /Data/*.txt; do
    ...
done
Posted by: Guest on May-25-2020
0

for loop in bash for files

#!/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
Posted by: Guest on September-07-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language