i also thought that a jpg is a jpg regardless if the OS is showing me the extension or not, but the script doesn’t work if the extension is not on the name ( don’t know why ).
i’ve set the variable ‘fileName’ to ‘*’ and it found every file.
since the only thing that i know will be in ALL the pwg_high folders will be images, its alright that way.
i’ve tested both scripts and they work EXCELLENT!!!
now i have to add this lines somehow to my other scripts and see how it goes.
thank you VERY much for all your time, patience and trouble.
i promise to come back in a new post if i get stucked
thanks again!
Marto.
no prob! I’m glad it works…
And yes a jpg is a jpg even if it’s named .tiff but the shell (and finder) can be rather stupid. Perhaps a way to clear that up is when we used “*.jpg” we weren’t telling it to look for actual JPEG file types… but rather any file that has .jpg in the name.
Make sense?
And don’t forget to show us the finished product
yes. of course.
anyways, to search for a specific file type, will be a loss of time, since i need everything in the pwg_high… jpg, pcd, tiff, eps, gif, psd…
I never caught that requirement (I think it was only expressed by the entire contents
code).
If you want to remove duplicates from the log at some point, then you could probably use grep -v
to get all the other lines (and then redirect them back to the log file).