I have a folder with a bunch of subfolders, these folders have asciidoctor formated files with .adoc extension. Every time I made changes to files (which is often) I need to run asciidoctor -q filename.adocto compile it into HTML format. I am trying to automate the process. so far I have come with this using entr:ls *.adoc | entr asciidoctor -q *.adocbut only works with existing folder not for subfolders. I have tried this variation, but it doesn't work: find . -name '*.adoc' | entr asciidoctor -q *.adocAny ideas how I could implement this automate process for all the subfolders?
Bash script to monitor file change and execute command
bash;osx
Search for '*.adoc' filesTest if filename.adoc is newer than filename.htmlif so, run asciidoctor on itfind . -name '*.adoc' | while read FILE; do [ ${FILE} -nt ${FILE%adoc}html ] && asciidoctor -q ${FILE} ; doneor put in a script:#! /bin/bashfind . -name '*.adoc' | while read FILE; do    if [ ${FILE} -nt ${FILE%adoc}html ]; then        asciidoctor -q ${FILE}    fidoneThe one-line or the script can be run from crontab each minut:crontab -eadd a line* * * * * /home/joe/update_adoc.bash