I am trying to use fswatch to translate the following lines from a linux bash script to be able to run this on Mac OSX:
inotifywait -r -m 'myfolder/' | while read MODFILE
do
echo "something"
done
Since inotifywait does not work on Mac OSX, I want to replace the first line of fswatch . Although README links to the fswatch man page, it does not provide a link to it, and an Internet search does not give me anything. So I tried to play a little.
I created a folder called testfswatch/, and I tried to execute the following commands in the parent folder, and then add and modify the files in the folder testfswatch/:
fswatch -o testfswatch/ | echo "LALA"
fswatch -o testfswatch/ | someSimpleProgram
fswatch -o testfswatch/ | xargs -n1 -I{} echo "LALA"
fswatch -o testfswatch/ | xargs -n1 -I{} ./someExecutable
fswatch -o testfswatch/ | xargs -n1 echo "LALA"
fswatch -o testfswatch/ | xargs -n1 someExecutable
None of these commands do anything if I modify or add files to a folder tesfswatch/.
- , ? !