Hacker News new | ask | show | jobs
by OskarS 2307 days ago
If you're going to be using any system like this (either watch or inotifywait), be careful. It's a good chance it's going to run in an "intermediate" state when it's not supposed to run and can do harm to your system (delete files or whatever). Bash scripts are especially dangerous, but it applies to any language.

A good idea would be to at least run the script in some kind of sandbox, so you don't accidentally do something dumb.