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. Regards, Keith. _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff