2

I have a script that every time creats several tiff files and stores them in the same directory. I want to change it in a way that every time it processes only the new files, to avoid repeating the same processing every time for every file.

I looked the manual and several questions so far, made an if statement with ! -e, ! -f, ! -s (I don't really get the difference but none of them worked anyway), tried to add spaces between all parts of code, tried the filename with "" and without but there is no way I can make it work.

Any suggestions? Here is my code:

FileName=$WORKDIR'/.../name_of_the_file.tif'
if [ ! -e "${FileName}" ]; then
    ...  
fi
John Kugelman
  • 307,513
  • 65
  • 473
  • 519
Dr. E
  • 21
  • 1
  • 1
    What do you mean by "it does not work"? Please describe in more detail what you expect to happen and what happens instead. – mkrieger1 Jan 25 '18 at 14:37
  • Is `...` an ellipsis or is that supposed to be `..` to go to the parent directory? – John Kugelman Jan 25 '18 at 14:37
  • ... means all the directories that are in the middle. – Dr. E Jan 25 '18 at 14:39
  • When I delete one .tif to check if it works, sometimes it does not fill it and others it just reprocesses all the files, existing and not (I control the "last modified" data of the files). I haven't concluded yet when each case happens , since I've done lots of tests so far... – Dr. E Jan 25 '18 at 14:43

0 Answers0