Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

http://eradman.com/entrproject/

  find . -name "*.go" | entr -r go run my/main/file.go


That can’t handle file creation after the command is run, though, right?


I'm not sure about "find" -- but I also use "entr" for this (and just about a billion other tasks, is there anything you can't use it for?) and I personally do something like:

  ls src/**/*.filetype | entr -r -s "some command"
And this will catch new files


How is it going to catch new files? ls runs once, doesn't it?


Awesome


`man entr` has an example for dealing with new files using the `-d` option:

    $ while true; do ls src/*.rb | entr -d make; done




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: