Last active
December 9, 2021 13:04
-
-
Save hugows/7aa364b0870476106e99ac884b2dd1ad to your computer and use it in GitHub Desktop.
MacOs: Monitor new files, announce events, add new files to Yoink
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This didn't work with fswatch, but chokidar with poll monitor was fine: | |
`chokidar '*.json' -p --poll-interval 1000 -c 'say "{event}" && open -a Yoink {path}'` | |
I was using this to debug a HTTP server that generated log files every X minutes, so I didn't have to keep checking the terminal. | |
Another useful idea is to send results of a script to yourself via [Telegram](https://github.com/fabianonline/telegram.sh): | |
`chokidar '*.json' -p --poll-interval 1000 -c 'check_file.sh {path} | telegram -'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment