Quoting Wayne Werner's answer:
By putting the brackets around the letter and quotes around the string you search for the regex, which says, "Find the character 'f' followed by 'nord'."
But since you put the brackets in the pattern 'f' is now followed by ']', so grep won't show up in the results list. Neato!
With [f] i don't get the last line with the grep command it self in the output right diff: beetwen "ps aux | grep firefox" and "ps aux | grep [f]irefox" is the last output line
How can I prevent 'grep' from showing up in ps results?
If you don't want so see the last grep command you be called like ps aux | grep 'kate'
process/command in the process list you can use
ps aux | grep '[k]ate'
you can use this brackets []
with every command/process you searching
ps aux | grep '[c]ommand' or '[p]rocess'
You can also use, to get only the pid
pidof kate
or
pgrep kate
or
ps -ef | grep [k]ate