Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

env(1)

command(1)  —  Commands

NAME

command − Treats command arguments as simple commands

SYNOPSIS

command [-p] command_name [argument ...]

command [-v|-V] command_name

The command command causes the shell to treat the arguments to command as simple commands, and suppresses the default shell function lookup. 

FLAGS

-pPerforms the command search using a default value for PATH that is guaranteed to find all of the standard utilities. 

-vWrites a string to standard output that indicates the pathname or command to be used by the shell in the current shell execution environment to invoke command_name. 

-VWrites a string to standard output that indicates how the name given in the command_name operand will be interpreted by the shell in the current shell execution environment. 

DESCRIPTION

The command command allows you to run the following commands:

       •User-defined commands whose names correspond to shell built-in commands. 

       •System commands whose names correspond to shell built-in commands. 

The command_name argument specifies the name of a utility.  The one or more optional arguments to command_name specify strings treated as arguments to the specified utility.  It also provides information concerning how a command name will be interpreted by the shell. 

EXAMPLES

To ensure execution of the simple command pwd instead of the pwd shell built-in command, enter:

command -p pwd

The preceding command displays the full pathname of the current directory, and does not perpetuate a view of the current directory location created by links as the shell built-in command might do. 

EXIT VALUES

126The utility specified by command_name was found but could not be invoked. 

127An error occurred in the command command, or the utility specified by the command_name argument could not be invoked. 

If no error occurs, the exit status of command is that of the command specified by the arguments to command. 

RELATED INFORMATION

env(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026