Searching for non-exisitent files
My question is for bash scripting...
I have a path to a certain directory GGG and within GGG are a random amount of subdirectories and the number of directories can change. Each of these random directories are supposed to have the exact same file ZZZ.jpg.
I can easily return the path using locate or find when the file ZZZ.jpg exists, but I want to also return the path up to where the file would have existed. Basically I want the path when ZZZ.jph does not exist.
/GGG/HHH/ZZZ.jpg (This is no problem)
/GGG/III/ (No file - I want path up to and including III.