From 831a373a61b726ea2267f31a2d5e861457f71411 Mon Sep 17 00:00:00 2001 From: Csaba Palfi Date: Mon, 17 Aug 2015 17:41:47 +0100 Subject: [PATCH] make process count check even simpler Signed-off-by: Csaba Palfi --- tests/5_container_runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/5_container_runtime.sh b/tests/5_container_runtime.sh index 4fcc29e..cf24d72 100644 --- a/tests/5_container_runtime.sh +++ b/tests/5_container_runtime.sh @@ -62,7 +62,7 @@ else fail=0 printcheck=0 for c in $containers; do - processes=$(docker exec "$c" ps -el 2>/dev/null | tail -n +2 | grep -v "ps -el" | wc -l | tr -d ' ') + processes=$(docker exec "$c" ps -el 2>/dev/null | tail -n +2 | grep -c -v "ps -el") if [ "$processes" -gt 1 ]; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then