How can I read a list of filenames from a file in bash?

前端 未结 7 1191
青春惊慌失措
青春惊慌失措 2021-01-30 10:59

I\'m trying to write a bash script that will process a list of files whose names are stored one per line in an input file, something the likes of

find . -type f          


        
相关标签:
7条回答
  • 2021-01-30 11:46

    pipe your find command straight to while read loop

    find . -type f -mtime +15 | while read -r line
    do
       printf "do something with $line\n"
    done
    
    0 讨论(0)
提交回复
热议问题