- 博客(5)
- 收藏
- 关注
转载 java集合list,set,map区别与联系
转发http://www.360doc.com/content/12/0607/09/3040000_216555258.shtml
2013-08-12 13:25:04
304
原创 shell脚本中的函数
function printUsage(){for (( i=1;i<="${node_number}";i++ ))do if [ "$i" -eq 1 ]; then temp="${node[1]}" continue fi temp=$temp" ""or"" "${nod
2013-07-29 17:02:57
527
原创 shell &> 与 >> 的区别
1.expr 5 + 1运行结果:62.expr 5 + 1 >>/dev/null运行结果: 3.expr 5 + 1 &>/dev/nul运行结果: 1.expr 5 + a运行结果:expr: non-numeric argument2.expr 5 + a >>/dev/null运行结果: expr: non-numeric argument3
2013-07-29 16:52:57
1382
转载 Shell数值、字符串比较
原文:http://apps.hi.baidu.com/share/detail/31263915Shell中字符串、数值的比较二元比较操作符,比较变量或者比较数字.注意数字与字符串的区别. 整数比较 -eq 等于,如:if [ "$a" -eq "$b" ] -ne 不等于,如:if [ "$a" -ne "$b" ] -g
2013-07-29 13:12:19
352
转载 shell判断参数是否为数字
#!/bin/bash ## 方法1,有点问题 #if [[ "$1" =~"^[[:digit:]]*$" ]];then #if [[ "$1" =~"^[0-9]+$" ]];then # echo "$1 is number." #else # echo 'no.' #fi ## 方法2, 可以,不过不是bash实现的,是使用了gr
2013-07-29 12:50:21
3238
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人