To monitor a file in linux, I can use inotify-tools like this
#!/bin/bash
# with inotify-tools installed, watch for modification of file passed as first param
while inotifywait -e modify $1; do
# do something here
done
but how would I achieve this in OSX?