On 08/10/2017 10:07 AM, bruce wrote: > the test was to (1) replicate the results I get from the cmdline. > and to then (2) be able to pass a input/var to then generate the pgrep > count results > > the initial cmdline pgrep -- pgrep -f 'bash' | wc -l > -- on the test box, this returns a "50" count > > in testing using php/bash -- i get a "51" > > #!/bin/bash -f > # > # ptest.sh > # > > pgrep -f 'bash' | wc -l > > ------------------------------------ > > on the test centos box, there is no pgrep -c << option.. haven't > checked the fedora yet You do realize that when you execute the shell script ptest.sh you create one more process with "bash" in it? So.... [egreshko@meimei ~]$ pgrep -f 'bash' | wc -l 4 [egreshko@meimei ~]$ ./pt.sh 5 is totally correct. -- Fedora Users List - The place to go to speculate endlessly
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx