2008-05-01 14:47:54 +0100, Clint Adams: > On Thu, May 01, 2008 at 02:33:04PM +0100, Stephane Chazelas wrote: > > I don't really care about the "interactive" side of things > > ($ENV, $PSx, job control), but I tend to consider that for the > > scripting side of things, the optional features should be > > implemented. For instance, if you don't have command -v, there's > > no other reliable way to find out whether a command exists or > > not. So you have to have something (either "command -v" or > > "type"). > > If policy wants to mandate either "command -v" or "type", we could > conceivably move toward dropping "which" from debianutils.
I certainly have nothing against that :). "which" is a non-standard, non-portable command, it can't be used reliably in portable scripts anyway. On many unices, it's a csh script intended for csh users (read their ~/.cshrc to find out about aliases for instance). Only a built-in can return reliable information on which command the shell would run. "type" has been in the Bourne shell since SVR2 and is in every POSIX shell I know of but posh. I don't know of a modern system where "command -p sh -c 'command -v sh'" doesn't work either (which doesn't mean it doesn't exist, I'm mostly familiar with Linux, HPUX and Solaris)). regards, Stephane -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]