首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

关于shell type命令的一个疑问,请大家帮忙,该如何处理

2012-02-02 
关于shell type命令的一个疑问,请大家帮忙Python codekeegoo [ ~ ] :$ cat tmp.sh #!/bin/shecho `type -p

关于shell type命令的一个疑问,请大家帮忙

Python code
keegoo [ ~ ] :$ cat tmp.sh #!/bin/shecho `type -p svn`

Python code
keegoo [ ~ ] :$ ./tmp.sh -p: not found svn is /usr/bin/svn

Python code
keegoo [ ~ ] :$ . tmp.sh /usr/bin/svn

Python code
keegoo [ ~ ] :$ sh -x tmp.sh + type -p svn+ echo -p: not found svn is /usr/bin/svn-p: not found svn is /usr/bin/svn


为什么在当前shell中(. tmp.sh)可以执行成功,而在子shell中(./tmp.sh)确执行失败?
谁能具体说说,谢谢大家!

[解决办法]
那就接分吧

热点排行