for file in assets/* do filename=$(basename $file) if grep -q $filename pdf/paper.tex; then echo "$filename used in paper.tex" elif grep -q $filename slides/slides.md; then echo "$filename used in slides.md" else echo "$filename NOT USED !!!!!!" fi done