I have an input (let\'s say a file). On each line there is a file name. How can I read this file and display the content for each one.
If they all have the same extension (for example .jpg), you can use this:
for picture in *.jpg ; do echo "the next file is $picture" done
(This solution also works if the filename has spaces)