checkformat.bash
The logic can be slightly simplified, and the script doesn't require Bash after all.