pgrep

The command that prints the process IDs of processes whose name matches a pattern.

In more detail

It saves piping ps through grep, which also matches the grep itself. Check what it finds before sending signals to those processes.

Example

pgrep sleep

Related terms

Taught in

References