[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] CVS Build Problem

From: Keith MARSHALL
Subject: Re: [Groff] CVS Build Problem
Date: Thu, 5 May 2005 10:42:13 +0100

Larry Jones wrote, quoting Zvezdan Petkovic:
>> So the solution is to use command -v.
> Hardly -- "type" is probably more portable than "command -v" is. 
> Particularly since "command -v" is optional in the latest version of
> POSIX (it's part of the User Portability Utilities option).

I agree with Larry here.  For shell portability, the least common
denominator is Bourne shell, but this doesn't guarantee *ANY* degree of
POSIX compliance.

I will *NOT* use "command -v".  It is *NOT* a Bourne shell builtin -- on
SunOS it is available as an external binary, but how should I use it to
confirm its own existence in the first place?  What fallback code do I
specify, if it isn't present?

In Cygwin's "sh", (which is a renamed "ash"), "command" *IS* a builtin,
*BUT* it doesn't support *ANY* options, so "command -v" fails, simply
reporting "-v not found".

This definitely *ISN'T* any sort of portable solution.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]