From dfad78728f1dd6b3a486d0a3b3c19acdc89d461c Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Tue, 29 Jul 2025 10:29:39 +0900 Subject: [PATCH] Updated SC2009 (markdown) --- SC2009.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2009.md b/SC2009.md index bc247ed..9f9e31e 100644 --- a/SC2009.md +++ b/SC2009.md @@ -18,7 +18,7 @@ If you are just after a pid from a running program, then pgrep is a much safer a If you want a field that's not the pid, consider doing this through `ps` + `pgrep` instead of `ps` + `grep`: -``` +```sh for pid in $(pgrep '^python$') do user=$(ps -o user= -p "$pid")