Problem

When you look for a process in the output, the command line of often shows up:
This can make writing scripts for automating sys admin tasks difficult.

Solution

There are many ways to get around this problem. Grep has for example exclusion pattern option. However, there is a simple way when you use a shell that allows character regular expressions: using a simple expression that will not alter what you are searching for, yet prevent the command line itself from being matched. For example:
Notice the grep command line doesn’t appear any more in the results.

References