共 3 篇文章
显示摘要每页显示  条
Bash shell中bash、sh、source及“.”点等五种执行方式的区别与联系。I am 28 this year.[Geeklp@Geeklp-BashShell ~]$ bash b.sh b.sh:行11: myName: 为绑定变量[Geeklp@Geeklp-BashShell ~]$ sh a.sh My name is Geeklp .I am 28 this year.[Geeklp@Geeklp-BashShell ~]$ sh b.sh b.sh:行11: myName: 为绑定变量。[Geeklp@Geeklp-BashShell ~...
看下面这个比较复杂而真实的例子:forrest@forrest-laptop:~/study/shell/svn_tools$ tree .├── modules│ ├── log.sh│ ├── svn_core.sh│ └── utils.sh└── svncobranches.sh1 directory, 4 files依赖(导入)关系是:svncobranches.sh导入modules/svn_core.sh,svn_core.sh导入utils.sh和log.sh,log.sh导入utils.sh。
do count=`expr $count + 1` done # 函数中使用return返回时,返回值的数据类型必须是数字 return $count}# 在$()的圆括号中可以执行linux命令,当然也包括执行函数res1=$(func1)# 变量res2将会接收函数的返回值,这里是3res2=`echo $?`if [[ $res2 == 3 ]]; then echo "func1() succeeded!"else echo "Not a right number!"...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部