遇到了一个奇怪的问题
下面的这个脚本始终执行不了,看了语法,也没有发现问题
-rwxr-xr-x 1 user user 24 10 20 08:41 test.sh*
[user-no-power-mac-g5:~/bin] user% ./test.sh
tcsh: ./test.sh: Command not found.
[user-no-power-mac-g5:~/bin] user% more test.sh
#!/bin/sh
echo "ab"
[user-no-power-mac-g5:~/bin] user%
怀疑是/bin/sh找不到,直接执行,也没有问题
[user-no-power-mac-g5:~/bin] user% /bin/sh
sh-2.05b$
而下面这样的方式,好像是发现了一点问题,但还是不知道根本问题在哪里,请大家执教一下!!
[user-no-power-mac-g5:~/bin] user% tcsh ./test.sh
: Command not found.
ab
[user-no-power-mac-g5:~/bin] user%