Afficher un message
Vieux 08/11/2006, 19h04   #7
Michael Tosch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: invoking the non-builtin command (bash)

Stephane CHAZELAS wrote:
> 2006-11-8, 04:01(-08), Yakov:
> [...]
>>> note that "time" is a keyword in bash, not a command

>> Thanks, 'command time' does it -- invokes /usr/bin/time;
>> But it's confusing because man bash says 'command ...
>> ... Only builtin commands or commands found in the PATH
>> are
>> executed.'
>> (but I want only commands found in PATH and not builtins) but
>> 'command time' invokes /usr/bin/time because 'time'
>> is not shell builtin but a'shell keyword'. Wow.
>>
>> Theoretically, I still wonder of there is variant of 'command' that
>> invokes commands found in the PATH but not builtins.

>
> Indeed, I was confusing with zsh that behaves like that when not
> in sh/ksh emulation mode.
>
> Anyway, with zsh, I'd use =cmd, (=cmd is a globbing operator
> that expands a command to its full path).
>
> With bash, you could do:
>
> "$(command -v cmd)"
>


\time

seems to work as well(?)

--
Michael Tosch @ hp : com
  Réponse avec citation
 
Page generated in 0,06334 seconds with 9 queries