From 5e61022be1d0d25c3133fc43fe6b958a5297200e Mon Sep 17 00:00:00 2001 From: xiaoz Date: Tue, 22 Dec 2020 16:40:25 +0800 Subject: [PATCH] fix bug --- set_swap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set_swap.sh b/set_swap.sh index 3b55c7c..8761271 100644 --- a/set_swap.sh +++ b/set_swap.sh @@ -16,7 +16,7 @@ get_swap=`free -mt|grep 'Swap'|awk '{print $2}'` #内存如果小于2g,则设置2倍 if [ $p_mem -lt 2000 ] then - swap_value=`$p_mem*2` + swap_value=`expr $p_mem * 2` elif [ $p_mem -gt 2000 ] && [ $p_mem -lt 8000 ] #内存大于2G,小于8G,则设置和物理内存大小一致 then