I have a file that lists filenames, each on it\'s own line, and I want to test if each exists in a particular directory. For example, some sample lines of the file might be
Bash:
while read f; do [ -f "$f" ] && echo "$f" exists done < file.txt