foreach bash
for n in $(cat lists.txt )
do
echo "Working on $n file name now"
# do something on $n below, say count line numbers
# wc -l "$n"
done
#################
input="lists.txt"
## Let us read a file line-by-line using while loop ##
while IFS= read -r line
do
printf 'Working on %s file...\n' "$line"
done < "$input"
Hutch Polecat