I have a file folders.txt
one
two
three
four
...
that has a list of folder names. [one, two, three and four are names of folders].
Each of these folders has a number of files of different types (different extensions). I want a list of all the files in all the folders of one particular extension, say .txt.
How should my shell script look like?
Given the post is simply asking for a list of files, it’s quite simple: