Marc Haber wrote:
> otoh,
> 
> if command -v dotlockfile >/dev/null 2&>1; then
>    ...
> else
>    echo >&2 "no dotlockfile binary in path, not checking for already running 
> aide"
> fi
> 
> seems to do the job. Can you verify?

Your new code suggestion works fine and is an idiom that I have used
often in shell scripts.  So if you are okay with it then I am too.  I
am not aware of any situation in Debian (for example /bin/sh is really
ash, dash, etc.) where this does not work okay.

If I recall correctly the use of 'command -v' is an XSI extension.  I
have seen people object to using XSI extensions previously.  (shrug.)
I could go either way on this and do not have a strong preference.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to