When I'm only interested in presence of a process, I use `pgrep` which doesn't show this behaviour, e.g.: $ pgrep myprocess 1900 In other cases (when i'm interested in more info), I usually add a `| grep -v grep` to discard grep lines, e.g.: $ ps -ef | grep myprocess| grep -v grep