1、expr计算整数变量值
s=`expr 2 + 3`
运算符号和参数之间要有空格分开;
2、let命令
let
s=(2+3)*4
echo
$s
3、for语句
for 变量 in 列表
do
命令行(通常用到循环变量)
done
#!/bin/bash
for var in one two three four five
do
...
分类:
系统相关 时间:
2014-12-17 21:03:44
阅读次数:
221
< 文件 #here files<< 多行字串 #here documents<<< 单行字串 #here strings大约可以先这么理解尤其是在一下情况使用:while read A ; do ……done<<<"here strings" 以及cut-d""-f 2 <<<"345" 参考链接...
分类:
其他好文 时间:
2014-12-17 00:07:55
阅读次数:
178
前日,github的PHP板块惊现一段能够提升70%运行效率的代码,引发了全世界众多网友的吐槽和调侃,“awesome!”、“well done!”、“PHP是世界第一语言!”平时不苟言笑,埋头苦干的程序员们充分发挥了其幽默的一面,github成为了欢乐的海洋。 先来看看这一段神级的代码: ...
分类:
Web程序 时间:
2014-12-15 15:13:32
阅读次数:
119
package com.java7;public class BreakDemo { public static void main(String[] args) {done: for(int i = 0; i < 10; i++) { for(int j = 0; j <...
分类:
其他好文 时间:
2014-12-12 14:36:12
阅读次数:
119
DONE:Sport Style的风格配置。TODO:Algo完成对配置的“翻译”,以及对Render的输入。完成整个系统的联调。音乐的叠加。BurnDown:
分类:
其他好文 时间:
2014-12-12 10:08:54
阅读次数:
181
Easier Done Than Said?
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8339 Accepted Submission(s): 4093
Problem Description
Pas...
分类:
其他好文 时间:
2014-12-10 22:56:50
阅读次数:
178
---恢复内容开始---you can read this page: link->;you hava insalled Cmake on you window system.of caourse, if you hava done like this, you will meet two erro...
分类:
其他好文 时间:
2014-12-10 13:58:32
阅读次数:
168
/// /// 多线程执行 /// public class MultiThreadingWorker { /// /// 确保线程全部完成 /// private Done m_done = null;...
分类:
编程语言 时间:
2014-12-08 19:25:56
阅读次数:
183
Choosing a good InnoDB log file size is key to InnoDB write performance. This can be done by measuring the amount of writes in the redo logs. You can ...
分类:
数据库 时间:
2014-12-07 21:35:33
阅读次数:
274
现在的JS框架将ajax请求封装得非常简单,例如下面:$.ajax({
type: "POST",
url: "some.php",
data: { name: "John", location: "Boston" }
}).done(function( msg ) {
alert( "Data Saved: " + msg );
});
上面是基于jQuer...
分类:
Web程序 时间:
2014-12-05 17:28:40
阅读次数:
236