Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/charleszlu/murmur-info.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatenom <natenom@natenom.name>2013-05-08 19:37:04 +0400
committerNatenom <natenom@natenom.name>2013-05-08 19:37:04 +0400
commitedcae39f285cbc254257a4619288d89ac13016eb (patch)
treee8cc3d6496caaa0ff60dd26fd22d83aa58170538
parent720991f37d3554f2badcb7c16788a9e99852a4b0 (diff)
Use grep instead of cut
-rw-r--r--minecraft_3
1 files changed, 1 insertions, 2 deletions
diff --git a/minecraft_ b/minecraft_
index 0353906..837d36b 100644
--- a/minecraft_
+++ b/minecraft_
@@ -18,8 +18,7 @@ PLAYERCOUNT=$(netstat -tn | grep -i ${MC_PORT} | grep ESTABLISHED | wc -l)
MC_PID=$(netstat -tlpn | grep ${MC_PORT} | sed -n -e '1p' | awk '{ print $7 }' | cut -d'/' -f1)
if [ ! -z "${MC_PID}" ]
then #is running
- MEMORYRSS=$(ps -p ${MC_PID} -o rss | cut -d'
-' -f2)
+ MEMORYRSS=$(ps -p ${MC_PID} -o rss | grep -v RSS)
MEMGiB=$(echo "scale=2;${MEMORYRSS}/1024/1024" | bc -l)
else
MEMGiB=0