导航

2012年11月28日

摘要: #!/bin/bashexport PATH="$PATH":/usr/local/binfilepre="/data1/www/htdocs/xxx.xxx.xxx/system/"filename=("sendbadge.php" "sendcache.php" "sendmail.php" "sendnotice.php" "sendweibo.php")logname=("testsendbadge.log" "tes 阅读全文

posted @ 2012-11-28 16:48 surealland 阅读(113) 评论(0) 推荐(0) 编辑

摘要: — http://blog.fallseir.com/2008/10/array_in_shell/$arr=(1233435)$echo$arr//默认获取第一个元素>123$echo${arr[1]}//通过下标访问>34$echo${arr[@]}//访问整个数组,@或者*获取整个数组>1233435$echo${#arr[@]}//获取数组的长度(最大下标),#获取长度数组中是最后一个下标>3$echo${#arr[3]}//获取字符串长度>1$echo${arr[@]:1:2}//切片方式获取一部分数组内容>343$echo${arr[@]:2}/ 阅读全文

posted @ 2012-11-28 16:39 surealland 阅读(153) 评论(0) 推荐(0) 编辑