I previously posted a question (answered quickly and succesfully - thanks!) about filtering out TIFF files from a directory tree that have no matching PDF associated with them. (See previous MeFi question
Now I've been trying to modify that script without success to do the following:
Find all PDF files in a directory tree that do not have a matching (that is, filename match) with an additional set of characters in the filename. The characters are: _Aug11
So, if I have a set of files in a directory:
then the file "two.pdf" has no corresponding "two_Aug11.pdf". I need the script to echo this filename out (or to a file, whatever).
I tried using the original script but obviously when you find all .pdf files, you match the _Aug11 ones also. So the script would report that one_Aug11.pdf has no matching one_Aug11_Aug11.pdf which is not what I want.
Am I looking at using awk to solve this? I am not clear on how to use awk witihin a bash script. Help!