遇到了一个奇怪的问题

lyl_98 2010-10-20 08:52:51
下面的这个脚本始终执行不了,看了语法,也没有发现问题
-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%
...全文
145 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
codesnail 2010-10-20
  • 打赏
  • 举报
回复
jf................
lyl_98 2010-10-20
  • 打赏
  • 举报
回复
是回车、换行符号的问题。
结贴了

37,719

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧