Skip to main content
Commonmark migration
Source Link

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?

See this [question][1].

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?

See this 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

replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

See this [question][1].

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?grep - why do brackets in grep pattern remove the grep process from ps results?

See this [question][1].

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?

See this [question][1].

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?

added 6 characters in body
Source Link
Stefan
  • 26.1k
  • 41
  • 103
  • 127

See this [question][1].

When you run ps ax | grep string:

[steve@sage-arch ~]$ ps ax | grep openbox'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'[s]tring':

[steve@sage-arch ~]$ ps ax | grep [o]penbox'[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?

See this [question][1].

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?

See this [question][1].

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?

added 46 characters in body
Source Link
Stefan
  • 26.1k
  • 41
  • 103
  • 127
Loading
Post Made Community Wiki
Source Link
Stefan
  • 26.1k
  • 41
  • 103
  • 127
Loading