错误的解释器:.sh脚本上没有这样的文件或目录

Heres the code that return me a bad interpreter when running from terminal in Linux:

#!/bin/bash

for dir in test/*/
do
./install_module.php $dir
done

sass test/Style/test.scss:themes/ModernAqua/css/test.css --style compressed
echo "Sass styles regenerated"

Most probably, your install_module.php has a #! directive for an interpreter that is not installed (or is installed somewhere else.) Locate the php binary (which most probably what this script needs) and correct that directive.

Also, by running your outer script with -x parameter to bash will provide more information where exactly the problem is.