From 7c6f90916535f5ca5b5d923d5621e517bf9be608 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Mon, 4 Sep 2017 08:44:42 +0300 Subject: [PATCH] posix friendly --- web/ssh-tunnelier | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/ssh-tunnelier b/web/ssh-tunnelier index 172452a..53efb43 100755 --- a/web/ssh-tunnelier +++ b/web/ssh-tunnelier @@ -51,8 +51,8 @@ colMenu=$( _qCol z y ) colWarn=$( _qCol z R ) function fpgrep() { - pgrep -x -u $UID "$@" | xargs --no-run-if-empty ps -o pid,bsdstart,args; - test ${PIPESTATUS[0]} -ne 0 && echo '----' + [[ -z $( pgrep -x -u $UID "$@" ) ]] && { echo '----'; return; } + pgrep -x -u $UID "$@" | xargs ps -o pid,bsdstart,args } function get_id() {