Using a shell script, can I watch a folder and block program execution until a file in a certain folder changes?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 month ago* (last edited 1 month ago)

test also has the -N option.

 -N FILE
   FILE exists and has been modified since it was last read

[ -N $file ] && echo "$file has been modified", no?

  • source