I have directory, that gets new .gz files during the day. I'd like to have a scripts that I start in the morning, and which keeps reading the data (and possibly processing it) as the new files are added. What would be the cleanest way to do it?
Asked
Active
Viewed 55 times
0
inotify
if you are on Linux, or equivalent elsewhere. See https://stackoverflow.com/a/18692191 – Patrick Mevzek Jan 26 '18 at 19:09inotifywait -m /path -e create | while read path action file; do process "$file" ; done
whereprocess
is your processing part. Put all of it in a file, add execute bits, and start it in the morning. – Patrick Mevzek Jan 26 '18 at 19:22