Linux Shell 脚本编程之函数
来源:互联网 发布:众筹行业数据报告 编辑:程序博客网 时间:2024/04/29 22:45
注意事项: $# 表示输入参数的个数. $0 表示文件名 $1表示输入的第一个参数.
#!/bin/bash
#purpose:to test shell funtion
#date:2015-02-05
#author:lirongqiang
function sayHello(){
echo "my first function"
return 0;
}
sayHello;
result=$?;
echo $result;
if [ $result = 0 ];then
echo "function has been executed successfully"
else
echo "error"
fi
0 0
- Linux Shell 脚本编程之函数
- linux shell编程
- Linux Shell编程入门
- linux 脚本实例 …
- Linux Shell 简介
- linux shell脚本用while&nbsp…
- linux getopt函数
- Linux shell脚本全面学习
- shell - if []
- linux lds 链接脚本转载
- [转]linux shell if 参数
- [转]linux shell if 参数
- [转]linux shell if 参数
- Linux 启动脚本 完全注释 1 -- 整…
- 透过 Linux 内核看无锁编程
- Linux:网络编程 (上)
- 【 Makefile 编程基础之…
- linux 多线程编程 ---- 信号量的使…
- hadoop学习笔记(笔记比较乱,随性…
- log4j针对某个类输出到一个日志做…
- 软件测试工程师入门之道
- tomcat 启动脚本
- 给xcode设置快捷键
- Linux Shell 脚本编程之函数
- 大数据hadoop学习之---Yarn 体系架…
- 分布式事务处理,两端提交协…
- 分布式消息处理中间件-Kafka学习笔…
- zookeeper在整个hadoop生态系统中…
- 必须的相关技术体系
- B-树和B+树的应用:数据搜索…
- 同步转换为异步思考
- Guava使用笔记系列之集合工具的高…