Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1694771
  • 博文数量: 362
  • 博客积分: 10587
  • 博客等级: 上将
  • 技术积分: 4098
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-10 18:15
文章分类

全部博文(362)

文章存档

2014年(1)

2013年(58)

2011年(115)

2010年(112)

2009年(76)

分类:

2010-09-15 12:00:11

test @test test]# declare [-afirx] 
参数说明: 
-a  :定义为数组 array 
-f  :定义为函数 function  
-i  :定义为整数 integer 
-r  :定义为『只读』 
-x  :定义为透过环境输出变量 
范例: 
[test @test test]# declare -i a=3 
[test @test test]# declare -i b=5 
[test @test test]# declare -i c=$a*$b 
[test @test test]# echo $c 
15  <==变成数字啰! ^_^
阅读(604) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~