command

NAME

command - execute a simple command

SYNOPSIS

command [-pVv] command_name [ args ]

DESCRIPTION

The command(1) shell built-in executes command_name as if it had been given from the command line, with two exceptions. First, command_name cannot be a shell function, and second, special built-in commands lose their specialness (that is, redirection and utility errors do not cause the shell to exit, and command assignments are not permanent). This makes command(1) useful for stepping around shell functions that have already been defined.

OPTIONS

-p
Use a default search path (the output of getconf CS_PATH) instead of the current PATH
-V
Like -v, but verbose.
-v
Instead of executing command_name, display information about the command that would be executed. For special and regular built-in commands and functions, command(1) prints their names; for aliases, it prints the command that defines them, and for commands found by searching the PATH parameter, it prints the full path of the command. If no command is be found, (that is, the path search fails), nothing is printed and command(1) exits with a non-zero status.

RETURN CODES

On success, the command(1) built-in utility returns 0. On failure, it returns >0.

SEE ALSO

sh(1)