遇到了一个奇怪的问题
时间:2010-10-20
来源:互联网
下面的这个脚本始终执行不了,看了语法,也没有发现问题
-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%
-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%
作者: lyl_98 发布时间: 2010-10-20
是回车、换行符号的问题。
结贴了
结贴了
作者: lyl_98 发布时间: 2010-10-20
jf................
作者: codesnail 发布时间: 2010-10-20
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28