Add note about entr

This commit is contained in:
Talia 2022-05-30 15:19:33 +02:00
parent dc23129cae
commit 6554e5e02e
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
---
tags: automation
---
# entr
Runs a command when files change:
```sh
find -type f -name '*.c' | entr make
```
Use `-s` to interpret the first argument as a shell command:
```sh
find -type f | entr -s "clear && ls"
```
## Services
Use `-r` to monitor and automatically restart services:
```sh
find -name "*.lua" | entr -r lua server.lua
```