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
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
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