2015年5月7日

shell脚本只提供整数算术运算(三种方式)—((表达式))、let "表达式"、value=`expr 表达式右边` (转载)

摘要: 转自:http://blog.163.com/xychenbaihu@yeah/blog/static/132229655201131055455754/数值运算:在bash中只提供了整数运算,一般shell通过let和expr这两个指令来实现。使用格式为: let "x=$x+1" 或者 x=`e... 阅读全文

posted @ 2015-05-07 15:29 次奥砖家 阅读(501) 评论(0) 推荐(0) 编辑

bash 脚本编程七 将命令输出保存到变量中(转载)

摘要: 转自:http://blog.csdn.net/csfreebird/article/details/7978699`符号包含的命令执行完后,可以讲其输出结果保存到变量中 #!/bin/bash v=`java -version` echo $v 执行结果:... 阅读全文

posted @ 2015-05-07 11:02 次奥砖家 阅读(417) 评论(0) 推荐(0) 编辑

导航