Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Ridiculous Online Programming "Advice" Date: 11 Jan 2026 22:51:57 GMT Lines: 29 Message-ID: References: <546dnQ79vYkSZP_0nZ2dnZfqnPSdnZ2d@giganews.com> <10jvu79$3ql4q$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net CjfEjm7iDqPh/OTk6LMwMQnoK4M+ZvHm/I8taENqtM/6R+TgAM Cancel-Lock: sha1:DXuQazmjq2XW8ej3vhKKRi6FJ+w= sha256:Eiqr7BNclAPLXjPkF3+7m2KxL/llDR1wzme2BYwnAwA= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:80949 On Sun, 11 Jan 2026 10:32:08 +0000, Nuno Silva wrote: > These two produce an off-by-one, right? The bash version does since it also counts 'grep --color=auto watchdogd' along with the watchdogd process itself. improved version: AmRunning() { ps aux | grep -v "grep" | grep $1 | wc -l } $ AmRunning firefox 11 That was an unexpected result since Firefox wasn't running. Further investigation revealed Tor was showing its roots tor-browser/Browser/firefox.real Kill Tor and $ AmRunning firefox 0