Comment Comment by ploxiln Yeah, the "ps | grep | grep -v grep" pattern is silly, there are a few better ways. In this case just: old_pids=$(pgrep '^haproxy') parent ploxiln 9 years ago