builtin
Bash command -v — locate a command
Reports how a command name would be resolved; it may return a builtin name or an executable pathname. Does not execute the named command.
Formal Syntax & Structure
bash syntaxbash
command -v nameParameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Command to inspect. |
Return Value
exit status
Zero if found, nonzero otherwise.
Working Example
Example Snippetbash
type -t printfcommand -v printf