Skip to content

Instantly share code, notes, and snippets.

View lsemenenko's full-sized avatar

Leo Semenenko lsemenenko

View GitHub Profile
@lsemenenko
lsemenenko / watch.sh
Last active February 15, 2020 10:19 — forked from fago/watch.sh
Inotify script to trigger a command on file changes, e.g. rsync
#!/bin/bash
# (c) Wolfgang Ziegler // fago
#
# Inotify script to trigger a command on file changes.
#
# The script triggers the command as soon as a file event occurs. Events
# occurring during command execution are aggregated and trigger a single command
# execution only.
#
# Usage example: Trigger rsync for synchronizing file changes.