SHELL 中的括号
来源:互联网 发布:excel中国数据地图 编辑:程序博客网 时间:2024/05/16 11:15
SHELL中的双括号
2011-06-30 14:58
在bash中计算i=i+1有三种办法:
1.i=$(($i+1))
2.i=`expr $i + 1`
3.let “i=i+1″
其中第一种和第二种是可以在sh里面使用的,第三种只能在bash里使用,还是第一种最简单,通用。
双括号还有妙用
for ((i=1;i<=num;i++))
shell里面是不允许if [ $a != 1 || $b = 2 ]出现的,要用
if [ $a != 1 ] || [ $b = 2 ]]
用双括号可以解决
if [[ $a != 1 || $b = 2 ]]
if [ "$a" -lt "$b" ]也可以改成双括号的形式
((“$a” < “$b”))
- shell编程中的括号
- SHELL 中的括号
- shell 中的双括号
- shell中的各种括号
- shell中的括号
- shell中的各种括号
- shell 中的括号()[] {} (()) [[]]
- shell中的各种括号
- shell中的各种括号
- shell中的括号
- shell中的括号
- shell中的括号
- shell中的括号
- linux shell中的括号
- shell中的各种括号
- shell 中的各种括号
- shell中的各种括号
- Shell中的括号
- 放下了.net ,走上了java
- 代码优化
- warning: dereferencing type-punned pointer will break strict-aliasing rules(转)
- 关于数字转换成人民币大写的问题
- 辗转相除法求最大公约数
- SHELL 中的括号
- linux下串口调试工具_xgcom
- python 中使用ftpmirror的例子
- #define const为什么不能用定义的量做位宽跟定义数组长度?
- C++报错集合:在Linkeage时出现undefined reference to `SPTraderController::writeAplLog(bfl::BString const&)'
- 新浪微博布局学习——妙用TabHost
- Hadoop上配置jconsole
- 关于NFC项目中引用系统的android_framework-class.jar包
- 移动互联方面的一些问题