数学表达式的计算示例:
root@Storage:/mnt/mtd# cat rss.sh
#!/bin/sh
while true
do
cat /proc/2409/stat |awk -F" " ‘{print $24}‘
rss=`cat /proc/2409/stat |awk -F" " ‘{print $24}‘`
page=4096
echo rss=$[$page * $rss / 1024 / 1024]
sleep 1
done
原文地址:http://blog.csdn.net/xiangpingli/article/details/41511831