码迷,mamicode.com
首页 >  
搜索关键字:done    ( 2584个结果
linux_后台启动多个java -jar 程序,及关闭
启动脚本startup.sh#!/bin/bashx=$(($1))while (($x>0))do java -jar /home/chenpenghui/crawler/crawler-hb/StartUpIp.jar & sleep 3 x=$(($x-1))done线程数 ...
分类:编程语言   时间:2014-07-19 21:00:09    阅读次数:273
UVA Mapping the Swaps
题目如下: Mapping the Swaps  Sorting an array can be done by swapping certain pairs of adjacent entriesin the array. This is the fundamental technique used in the well-knownbubbl...
分类:移动开发   时间:2014-07-16 17:08:59    阅读次数:252
shell编程(十三) --- while循环
while循环适用于循环次数未知的场景。语法格式: whileCONDITION do statement …… done 说明:while是当CONDITION成立的时候就执行循环,当条件不成立时,退出循环。示例1:计算从1加到100.[root@Server3Learn]#catwhile1.sh #!/bin/bash declare-isum=0 declare-ii=0 while[..
分类:其他好文   时间:2014-07-16 16:42:00    阅读次数:191
bash arithmatic
Arithmetic in bash is done with $ and double parentheses:echo "$(($num1+$num2))"Or $ and square brackets:echo "$[$num1+$num2]"You can assign from that...
分类:其他好文   时间:2014-07-11 22:33:14    阅读次数:235
shell脚本解析5----循环语句
一、for循环for var in [ list ]do #code blockdone$var是循环控制变量,[list]是var需要遍历的一个集合,do/done对包含了循环体。如果do和for被写在同一行,必须在do前面加上“;”,如:for $var in [list]; do例如:#!/....
分类:其他好文   时间:2014-07-11 10:39:39    阅读次数:178
Linux for循环执行命令注意事项
如果for循环命令中带有一些符号,需要用()括起来。 for i in {1..4}; do (python /data/UGCRobot/manage/Scheduler.py 1.log > /dev/null 2>&1 &); done...
分类:系统相关   时间:2014-07-10 22:30:56    阅读次数:387
fuelSources
function countdown() { local i; sleep 1 for ((i=$1 - 1;i>=1;i--));do printf '\b\b%02d' "$i" sleep 1 done}export LANG=en_US.UTF8;if [ -f /root/.showf.....
分类:其他好文   时间:2014-07-09 21:00:48    阅读次数:197
iOS关闭编辑框的键盘
在 iOS 程序中当想要在文本框中输入数据,轻触文本框会打开键盘。对于 iPad 程序,其键盘有一个按钮可以用来关闭键盘,但是 iPhone 程序中的键盘却没有这样的按钮,不过我们可以采取一些方法关闭它。例如,我们可以实现按下 Rerun (有时也是 Done、Research 等)键关闭键盘,或者...
分类:移动开发   时间:2014-07-09 19:08:15    阅读次数:283
ajax全局
$.ajaxSetup({ complete: function (xhr) { xhr.promise().done(function (json) { if (json.errorNo == "9202") { $("#di...
分类:其他好文   时间:2014-07-09 15:10:07    阅读次数:246
shell脚本精华----在10秒内SSH登录失败次数超过3次就使用iptables/tcpwrappers拒绝
#!/bin/bashwhiletruedo badip=$(lastb-i-a|awk‘/ssh:notty/{print$NF}‘|sort|uniq-c|awk‘($1>3){print$2}‘) foriin$badip do iptables-tfilter-IINPUT-s$i-ptcp--dport22-jDROP done :>/var/log/btmp sleep10sdone
分类:移动开发   时间:2014-07-04 06:22:09    阅读次数:364
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!