摘要:status=`curl -o /dev/null -s -m 5 -w %{size_download}:%{http_code}:%{time_total}:%{time_connect}:%{size_header}:%{time_namelookup} $url` curl -o /dev/
阅读全文
posted @ 2016-09-19 14:10
|
||
随笔分类 - 70-shell
摘要:status=`curl -o /dev/null -s -m 5 -w %{size_download}:%{http_code}:%{time_total}:%{time_connect}:%{size_header}:%{time_namelookup} $url` curl -o /dev/
阅读全文
posted @ 2016-09-19 14:10
摘要:$ sudo /sbin/chkconfig --list cgconfigcgconfig 0:off 1:off 2:off 3:off 4:off 5:off 6:off$ sudo /sbin/chkconfig cgconfig on$ sudo /sbin/chkconfig --lis
阅读全文
posted @ 2016-09-05 10:26
摘要:假设aa 为 ./shell.sh aa=${aa##*/} aa=${aa%%.*} 截取后 aa=shell 假设有变量 var=http://www.google.com/test.htm 一 # 号截取,删除左边字符,保留右边字符。echo ${var#*//}其中 var 是变量名,# 号
阅读全文
posted @ 2016-09-01 14:44
摘要:i=`expr $j - $k` ((i=$j+$k)) 等价于 i=`expr $j + $k`((i=$j-$k)) 等价于 i=`expr $j -$k`((i=$j*$k)) 等价于 i=`expr $j \*$k`((i=$j/$k)) 等价于 i=`expr $j /$k`
阅读全文
posted @ 2016-09-01 14:36
摘要:find ./ -name xxx -mtime xxxxx find . –mtime中的参数n find . –mtime n中的n指的是24*n, +n、-n、n分别表示: +n: 大于n -n: 小于n 距离当前时间为n*24小时以内 n:等于n 更详细解释: 但是man find里这样的解
阅读全文
posted @ 2016-09-01 14:32
摘要:if [ "$str" = "" ] $变量 记得加上 双引号 主要有以下几种方法:echo “$str”|awk '{print length($0)}'expr length “$str”echo “$str”|wc -c但是第三种得出的值会多1,可能是把结束符也计算在内了 判断字符串为空的方法
阅读全文
posted @ 2016-09-01 14:28
|
||