14 Practical examples of the grep command

grep is a command-line utility that allows searching of words and/or patterns in a file or group of files. Its name comes from the ed command g/re/p (globally search a regular expression and print). Grep does a global search by keyword or regular expression and print all matching lines on the standard output.

Exclude the process grep on ps ax output

Regularly I use ps ax | grep pattern to get information about a particular process, but in the oupout the grep process is shown, how to avoid this?

Simply encloses within square brackets the first letter or number of the pattern, for example: