Photobooth script - needs help with inotify

Hi all, 4 years ago one of the members of this list, responding to a question I posed on the "Linux Answers" site, supplied me with this script which met my need for a photobooth running with Cheese. #! /bin/bash inotifywait -m -e close_write ~/Pictures/Webcam --format "%w%f" | \ while read filename; do lpr -P HP "$filename"; mv "$filename" ~/Pictures/Webcam/printed; done I know that 4 years in Linux is a long time, so I was not surprised to find that the script failed because the inotifywait command is no longer recognised. I am not skilled in scripting but I did read the man file. My questions are, do I substitute in_add_watch instead of inotifywait? Do I keep the rest of the line the same? Many thanks Andrew Greig

On 14/06/16 21:08, Andrew Greig via luv-main wrote:
I know that 4 years in Linux is a long time, so I was not surprised to find that the script failed because the inotifywait command is no longer recognised. I am not skilled in scripting but I did read the man file.
The inotify-tools package is still available on Debian based distros and probably the others (though it may not be installed by default). Glenn -- sks-keyservers.net 0x6d656d65
participants (2)
-
Andrew Greig
-
Glenn McIntosh