FG
💻 Software

Run Script on File Change on Mac OS X

Fresh5 days ago
Mar 15, 20269297 views
Confidence Score0%
0%

Problem

Anyone know about a program for Mac OS that you can pass the name to an executable and a file to watch, so that it then runs the executable everytime the file being watched changed? I have something like this in mind:

Error Output

$ fwatch /Users/foo/doc.tex /Users/foo/run-pdflatex.sh &
  fwatch running. Listening for changes in /Users/foo/doc.tex.
$ echo "This aint no LaTeX" >…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Run Script on File Change on Mac OS X

Low Risk

You can set this up using launchd. Specifically, you need to use the watchpaths key in your launchd plist to look for changes in that file. Exhaustive information available in this AFP548 article. Although it appears it's no longer under development…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment