A long time ago I came across a nifty little script called atchange. It worked and served me well. You give the script a file to watch for changes and a command to execute if changes occurred.
Tags: Code, command c, GPL, multiple files, Opensource, pitfall, terminal session, test, threads, warm up exercise