This does not work out of the box on Linux because of the unexpected ^M. You have to run the files with errors through dos2unix before it works correctly.