按任意键继续
摘要:按任意键继续任意脚本代码:any.sh[root@localhost ~]# cat insert.sh #!/bin/bashget_char(){SAVEDSTTY=`stty -g`stty -echostty cbreakdd if=/dev/tty bs=1 count=1 2> /dev...
阅读全文
posted @
2015-02-03 13:51
寒星12345678999
阅读(201)
推荐(0) 编辑
*查看进程所消耗的内存*
摘要:转#!/bin/sh mem=`free -m | awk 'NR==2{print $2}'` ps aux | sort -k 4 -r | awk '$4 ~ /^[0-9]/ && $4>0 {print $4,$11}' | awk '{print $1/100*mem" "$2}' me...
阅读全文
posted @
2015-02-02 14:38
寒星12345678999
阅读(155)
推荐(0) 编辑
test
摘要:test 1 -eq 2 &&echo ok||echo nottest $1 -eq $2 && **||**
阅读全文
posted @
2015-01-27 11:50
寒星12345678999
阅读(108)
推荐(0) 编辑
shell脚本判断进程是否运行
摘要:zzx@zzx120:~$if ps aux | grep "python"|grep -v grep > /dev/null #$?的值不同then echo "Running"else echo "Stopped"fi如何批量杀掉进程ps -ef |grep java |grep -v grep...
阅读全文
posted @
2015-01-27 11:45
寒星12345678999
阅读(1293)
推荐(0) 编辑