2017年4月14日星期五

linux awk与shell 参数互传

http://blog.csdn.net/flyqwang/article/details/6947742





 "####################################memorycheck#######################################"
memory=`free -m | grep Mem`
read total used buffers cached<<< `echo "$memory" |awk '{print $2,$3,$6,$7}'` 
echo "$total $used $buffers $cached"


let "usedtrue=used-buffers-cached" percent=`echo "$usedtrue*100/$total"|bc`"%" echo "## MEMORY Used Percent: $percent"

没有评论:

发表评论

Amazing Windows OS resources Share!!!

Almost all Windows OS List: https://www.heidoc.net/php/myvsdump_details.php?id=P1521F62172Ax64Lcn Latest keys:   https://bbs.kafan.cn/th...