shell 程序的[ ]要用空格与字符串隔开 if[-f "a.out"];then echo "a.out" fi 这样写是不正确的,改为 if [ -f "a.out" ];then echo "a.out" fi