mode tests to shell script