码迷,mamicode.com
首页 >  
搜索关键字:shell数组    ( 145个结果
使用shell数组重启tomcat
#!/bin/bashtomcat1="/usr/local/tomcat1/"tomcat2="/usr/local/tomcat2/"tomcat3="/usr/local/tomcat3/"tomcat4="/usr/local/tomcat4/"tomcat=($tomcat1$tomcat2$tomcat3$tomcat4)#for((i=0;i<${#tomcat[@]};i++));do#${tomcat[$i]}bin/shutdown.sh>>/dev/null2>&..
分类:其他好文   时间:2014-08-26 19:52:47    阅读次数:171
shell 脚本中$$,$#,$?
$0 这个程式的执行名字$n 这个程式的第n个参数值,n=1..9$* 这个程式的所有参数,此选项参数可超过9个。$# 这个程式的参数个数$$ 这个程式的PID(脚本运行的当前进程ID号)$! 执行上一个背景指令的PID(后台运行的最后一个进程的进程ID号)$? 执行上一个指令的返回值 (显示最后命...
分类:其他好文   时间:2014-08-21 11:18:33    阅读次数:148
shell--数组 组合 高级应用
#!/bin/bash# 用shell中的数组构造统计不同的组合个数.# 下面的组合有(1,6)(3,4)(5,5)(1,6)(5,5)(4,3)(1,8)# 不同的组合为(1,6)(3,4)(5,5)(4,3)(1,8)arrayLeft=(1 3 5 1 5 4 1)arrayRight=(6 ...
分类:其他好文   时间:2014-05-26 19:17:19    阅读次数:409
linux shell 数组建立及使用技巧
转载:http://www.cnblogs.com/chengmo/archive/2010/09/30/1839632.htmllinux shell在编程方面比windows 批处理强大太多,无论是在循环、运算。已经数据类型方面都是不能比较的。 下面是个人在使用时候,对它在数组方面一些操作进行的...
分类:系统相关   时间:2014-05-26 09:17:42    阅读次数:446
Shell 向函数传递 数组
分类:其他好文   时间:2014-05-09 14:18:47    阅读次数:202
145条   上一页 1 ... 13 14 15
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!