Advertisement
Guest User

Untitled

a guest
Feb 16th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. inotifywait -m /files/ -e create -e moved_to |
  2. while read path action file; do
  3. echo "The file '$file' appeared in directory '$path' via '$action'"
  4. echo "waiting 30s"
  5. sleep 30s
  6. # do something with the file
  7. sendEmail -o tls=yes -f my@email.it -t receive@email.it -s smtp.email.it:587 -xu my@email.it -xp mypassword -u "Scansione" -m "Invio scansione" -a /files/$file
  8. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement