Re: /bin/dash -c != /bin/bash -c with pgrep

2012-01-24 Thread Jonathan Nieder
Hi Richard, Richard Retanubun wrote: /bin/dash -c pgrep -f /usr/sbin/atftpd; echo $? -vs- /bin/bash -c pgrep -f /usr/sbin/atftpd; echo $? The dash version returns the PID of the grep itself and thus always succeeds. The bash version works as expected. As the pgrep(1) manual explains, the

Re: /bin/dash -c != /bin/bash -c with pgrep

2012-01-24 Thread Richard Retanubun
On 24/01/12 02:43 PM, Jonathan Nieder wrote: Hi Richard, Richard Retanubun wrote: /bin/dash -c pgrep -f /usr/sbin/atftpd; echo $? -vs- /bin/bash -c pgrep -f /usr/sbin/atftpd; echo $? The dash version returns the PID of the grep itself and thus always succeeds. The bash version works as

Re: /bin/dash -c != /bin/bash -c with pgrep

2012-01-24 Thread Richard Retanubun
On 24/01/12 03:17 PM, Richard Retanubun wrote: On 24/01/12 02:43 PM, Jonathan Nieder wrote: Hi Richard, Richard Retanubun wrote: /bin/dash -c pgrep -f /usr/sbin/atftpd; echo $? -vs- /bin/bash -c pgrep -f /usr/sbin/atftpd; echo $? The dash version returns the PID of the grep itself and thus