diff options
| author | Jokler <jokler@protonmail.com> | 2020-06-22 02:15:52 +0200 |
|---|---|---|
| committer | Jokler <jokler@protonmail.com> | 2020-06-22 02:21:55 +0200 |
| commit | 37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929 (patch) | |
| tree | ff1446fe9b369112bdd41aaa02bc99343a9ecdf8 /scripts/watch-dir | |
| parent | 1a357dd0a71d8e6d73cc8af4c93d3005576aff36 (diff) | |
| download | dotfiles-37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929.tar.gz dotfiles-37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929.zip | |
Add new scripts and update old ones
Diffstat (limited to 'scripts/watch-dir')
| -rwxr-xr-x | scripts/watch-dir | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/watch-dir b/scripts/watch-dir new file mode 100755 index 0000000..4fb701f --- /dev/null +++ b/scripts/watch-dir @@ -0,0 +1,8 @@ +#!/bin/sh + +inotifywait -r -m "$1" -e create -e moved_to | + while read -r path action file; do + echo "The file '$file' appeared in directory '$path' via '$action'" + done + +# vim: expandtab sw=2 ts=2 |
