My problem : The results returned by the find command do not seem "up to date".
I have a bash script in which :
- i get the list of gif files in a directory
- i use convert (from imagemagick) on them to make png
- i get the list of png files in the same directory (which may contain the previously generated ones if there were gif files here)
- i optimize them with optipng
If i let this script as is, when i have a gif, the corresponding png is not found. If i force the script to pause with a read from keyboard, then the new png is found.
My interpretation :
- either the convert immediately returns, so the find png executes before the gif to png file is created. In this case, how to force the next command to wait for it ?
- or the find command uses some system functions which needs time to update. In this case, how to force update on dir info ?
Thanks