grep: exclude grep from ps results

Tip: use a regexp so the grep is not matching the line where is sits in ps list:

ps -aef | grep "[m]atchingexp" will match anything starting with letter ‘m’ and followed by ‘atchingexp‘ , which will not be in the ps list as it will contain the [] around the first letter of your match