From 2d29af704e9f26a1ae4972825da34ad5a8d2899e Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Mon, 29 Jun 2015 22:22:12 +0200 Subject: [PATCH] Improve fix for issue 47 using prep -x -o The use of `pgrep -x`was proposed by @rnelson0. `pgrep -x -o` should limit the result to the oldest exactly matching execution of a binary called `docker`. Signed-off-by: Joachim Lusiardi --- helper_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper_lib.sh b/helper_lib.sh index bba1a9c..12276e2 100644 --- a/helper_lib.sh +++ b/helper_lib.sh @@ -41,7 +41,7 @@ contains() { get_command_line_args() { PROC="$1" - for PID in `pgrep $PROC` + for PID in `pgrep -x -o $PROC` do cat /proc/$PID/cmdline | tr "\0" " " done