linux shell script 函式
来源:互联网 发布:比价软件淘宝小密 编辑:程序博客网 时间:2024/06/05 20:29
1.简单的shell函式
先建立一个简单的shell函式,如下:
查看运行结果:
g
2.查看、移除函式
利用declare命令查看刚刚建立的dir_f函式。
declare -f dir_f
利用unset命令移除刚刚建立的dir_f函式。
uset -f dir_f
3.函式语法
由上面的简单例子可以看出,shell function的基本语法是:
name ( )
{
statement
}
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- linux shell script 函式
- 【Unix/Linux.Shell Script】Shell & Shell Script
- LINUX shell script 打包
- linux shell script 入门
- linux shell script
- Linux shell script
- [linux]shell script 随记
- Linux Shell Script Study
- FTP linux shell script
- linux-shell script
- Linux Shell Script目录
- Linux shell script
- linux shell script 练习
- Linux-Shell script
- Linux shell script学习
- 13linux script - shell script 例子
- A shell script, in Linux.
- linux shell script 例子1
- 计算机四级系列讲座 路由设计路由聚合,dhcp服务器类型
- cent os 6.2 64位 安装ngnix的方法
- java hive
- 调试技巧之调用堆栈
- 初试wget下载
- linux shell script 函式
- hadoop错误日志
- 程序员面试中什么最重要?
- 嵌入式Linux设备驱动编程(1):基础
- 看 37signals 如何招聘 UI 设计师
- 嵌入式Linux网络编程
- 我的设计模式学习之路5(观察者模式)
- Linux任务、进程和线程
- 文件I/O