摘要:
// 数组排序方法function IsBigger(val1, val2){ var bIsVal1Number = !isNaN(val1); var bIsVal2Number = !isNaN(val2); if(bIsVal1Number) { if(bIsVal2Number) { return (parseInt(val1) > parseInt(val2)); } else { return false; } } ... 阅读全文
摘要:
time1=$(date +%s -d '2014-01-13 22:46:05')for((;;))do time2=$(date +%s) time3=$((time1 - time2)) if [ $time3 -le 0 ] then break; fi echo $time3 sleep $time3done补充说明: shell 单括号运算符号: a=$(date); 等同于:a=`date`; 双括号运算符: a=$((1+2)); echo $a; ... 阅读全文