Pgrep -fx not matching anything

Hadrien Lacour hadrien.lacour at openmailbox.org
Mon Jun 26 13:46:24 UTC 2017


On Mon, Jun 26, 2017 at 02:43:07PM +0200, Denys Vlasenko wrote:
> Fixed in git just now, please try.
>
> On Tue, Jun 20, 2017 at 4:34 PM, Hadrien Lacour
> <hadrien.lacour at openmailbox.org> wrote:
> > Hello,
> > I'm having a bit of trouble using pgrep -fx; here's a simple example:
> > $ uname -a
> > Linux gentoo 4.9.33-gentoo #1 SMP Sun Jun 18 01:43:49 CEST 2017 x86_64 AMD
> > FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
> > $ busybox | head -n1
> > BusyBox v1.25.1 (2016-12-13 23:14:59 CET) multi-call binary.
> > $ pgrep --version
> > pgrep from procps-ng 3.3.12
> > $
> > $
> > $ sleep 1000 &
> > $ ps ax | grep sleep | head -n1
> >  9602 pts/5    S      0:00 sleep 1000
> > $ pgrep -flx "sleep 1000"
> > 9602 sleep
> > $ busybox pgrep -flx "sleep 1000"
> > $
> >
> > Also tested on busybox 1.25.2 (on Alpine)
> > _______________________________________________
> > busybox mailing list
> > busybox at busybox.net
> > http://lists.busybox.net/mailman/listinfo/busybox

It works now. The only difference with GNU is now the output (not really
important for me and better than GNU; no POSIX standard to follow here):

$ sleep 1000 &
$ pgrep -flx "sleep 1000"
24263 sleep
$ ./busybox pgrep -flx "sleep 1000"
24263 sleep 1000


More information about the busybox mailing list