1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

pgrep: Add -c option to show the number of matches

This commit is contained in:
Tim Ledbetter 2023-05-30 17:51:18 +01:00 committed by Andreas Kling
parent f95e6ee849
commit ad851706ab
2 changed files with 18 additions and 12 deletions

View file

@ -5,11 +5,12 @@ pgrep - look up processes based on name
## Synopsis
```sh
$ pgrep [-d delimiter] [--ignore-case] [--invert-match] <process-name>
$ pgrep [--count] [-d delimiter] [--ignore-case] [--invert-match] <process-name>
```
## Options
* `-c`, `--count`: Suppress normal output and print the number of matching processes
* `-d`, `--delimiter`: Set the string used to delimit multiple pids
* `-i`, `--ignore-case`: Make matches case-insensitive
* `-v`, `--invert-match`: Select non-matching lines