See this [question][1]question.
When you run ps ax | grep string:
[steve@sage-arch ~]$ ps ax | grep 'openbox' 3363 ? Ss 0:00 /usr/bin/openbox 3382 ? Ss 0:00 /usr/bin/ssh-agent -- /usr/bin/openbox-session 3386 ? S 0:00 /bin/sh /usr/bin/openbox-session 3388 ? S 0:00 /bin/sh /usr/bin/openbox-session 3389 ? S 0:00 /bin/sh /usr/bin/openbox-session 3390 ? S 0:00 /bin/sh /usr/bin/openbox-session 5100 pts/0 S+ 0:00 grep openbox the last line containing grep is somethings a bit anoying
You can rid yourself of this by running ps ax | grep '[s]tring':
[steve@sage-arch ~]$ ps ax | grep '[o]penbox' 3363 ? Ss 0:00 /usr/bin/openbox 3382 ? Ss 0:00 /usr/bin/ssh-agent -- /usr/bin/openbox-session 3386 ? S 0:00 /bin/sh /usr/bin/openbox-session 3388 ? S 0:00 /bin/sh /usr/bin/openbox-session 3389 ? S 0:00 /bin/sh /usr/bin/openbox-session 3390 ? S 0:00 /bin/sh /usr/bin/openbox-session update: or just run pgrep string [1]:grep - why do brackets in grep pattern remove the grep process from ps results?