-c, --count
Suppress normal output; instead print a count of matching
processes. When count does not match any‐
thing, e.g. returns zero, the command will return non-zero value.
Looks like you would want to use the --count flag instead of piping to wc:
[0:roo
On Wed, Aug 09, 2017 at 02:06:20PM -0400, bruce wrote:
> Hey peeps.
>
> From a fed/centos cmdline...
>
> pgrep -f "foo" | wc -l
>
> will return 0 -- if "foo" doesn't exist in the procTBL, and something
> else if "foo" is running.
>
> The curiousity... When I have a simple php
>
>
> $f="pgre
On Wed, 2017-08-09 at 14:06 -0400, bruce wrote:
> Hey peeps.
>
> From a fed/centos cmdline...
>
> pgrep -f "foo" | wc -l
>
> will return 0 -- if "foo" doesn't exist in the procTBL, and something
> else if "foo" is running.
>
> The curiousity... When I have a simple php
>
>
> $f="pgrep -f 'f
Hey peeps.
From a fed/centos cmdline...
pgrep -f "foo" | wc -l
will return 0 -- if "foo" doesn't exist in the procTBL, and something
else if "foo" is running.
The curiousity... When I have a simple php
$t isn't 0!! -- it's actually 1, or something else if foo is running..
Any ideas why?? I