zmv is a mv alternative bundled with zsh that has an expressive globbing syntax. In many cases it can replace loops, and it even has a dry run option!
https://filipe.kiss.ink/zmv-zsh-rename/
Today I learnt that make has a --dry-run option! Tools that want to discover project includes, such as rtags, use this to discover how your project is built:
Has anyone built a great solution to 'run all my unit tests automatically'?
It's straightforward to write a while loop in bash, but handling timeouts, syntax errors etc well is hard.
Running on save would be good, although I wonder if you could run fast tests on each keystroke.